Skip to content

Commit

Permalink
Ensure legend code can find boxwhisker and violin artists
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jun 26, 2018
1 parent ddd243b commit fae2159
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion holoviews/plotting/mpl/stats.py
Expand Up @@ -86,7 +86,9 @@ def get_data(self, element, ranges, style):
return (data,), style, {'dimensions': [format_kdims, element.vdims[0]]}

def init_artists(self, ax, plot_args, plot_kwargs):
return ax.boxplot(*plot_args, **plot_kwargs)
artists = ax.boxplot(*plot_args, **plot_kwargs)
artists['artist'] = artists['boxes']
return artists

def teardown_handles(self):
for g in ('whiskers', 'fliers', 'medians', 'boxes', 'caps', 'means'):
Expand Down Expand Up @@ -173,6 +175,7 @@ def init_artists(self, ax, plot_args, plot_kwargs):
for stat in ['cmedians', 'cmeans', 'cmaxes', 'cmins', 'cbars']:
if stat in artists:
artists[stat].set_edgecolors(stats_color)
artists['bodies'] = artists['bodies']
return artists

def get_data(self, element, ranges, style):
Expand Down

0 comments on commit fae2159

Please sign in to comment.