Skip to content

Commit

Permalink
Pass string names to silent_list, not classes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukelbd committed Sep 5, 2021
1 parent 6a0b457 commit 667cc06
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions proplot/axes/plot.py
Expand Up @@ -13,7 +13,6 @@
import matplotlib.cm as mcm
import matplotlib.collections as mcollections
import matplotlib.colors as mcolors
import matplotlib.container as mcontainer
import matplotlib.contour as mcontour
import matplotlib.lines as mlines
import matplotlib.patches as mpatches
Expand Down Expand Up @@ -1328,7 +1327,7 @@ def _plot_multicolor(
ypos = data._safe_mask(ys[1] >= ys[0], *ys)
kwargs[colorkey] = _not_none(poscolor, rc['poscolor'])
posobj = self._plot_native(name, x, *ypos, **kwargs)
return cbook.silent_list(type(negobj), (negobj, posobj))
return cbook.silent_list(type(negobj).__name__, (negobj, posobj))

def _plot_errorbars(
self, x, y, *_, distribution=None,
Expand Down Expand Up @@ -2758,7 +2757,7 @@ def _apply_plot(self, *pairs, vert=True, **kwargs):
edges.append(convert(max_))

self._update_guide(objs, **guide_kw)
return cbook.silent_list(mlines.Line2D, objs) # always return list
return cbook.silent_list('Line2D', objs) # always return list

@docstring._snippet_manager
def line(self, *args, **kwargs):
Expand Down Expand Up @@ -2823,7 +2822,7 @@ def _apply_step(self, *pairs, vert=True, where='pre', **kwargs):
objs.append(obj)

self._update_guide(objs, **guide_kw)
return cbook.silent_list(mlines.Line2D, objs) # always return list
return cbook.silent_list('Line2D', objs) # always return list

@data._preprocess('x', 'y', allow_extra=True)
@docstring._concatenate_original
Expand Down Expand Up @@ -3023,7 +3022,7 @@ def _apply_lines(
self._update_guide(objs, **guide_kw)
return (
objs[0] if len(objs) == 1
else cbook.silent_list(mcollections.LineCollection, objs)
else cbook.silent_list('LineCollection', objs)
)

# WARNING: breaking change from native 'ymin' and 'ymax'
Expand Down Expand Up @@ -3103,7 +3102,7 @@ def _apply_scatter(self, xs, ys, ss, cc, *, vert=True, **kwargs):
self._update_guide(objs, **guide_kw)
return (
objs[0] if len(objs) == 1
else cbook.silent_list(mcollections.PathCollection, objs)
else cbook.silent_list('PathCollection', objs)
)

@data._preprocess(
Expand Down Expand Up @@ -3175,7 +3174,7 @@ def _apply_fill(
self._add_sticky_edges(objs, axis, *sides)
return (
objs[0] if len(objs) == 1
else cbook.silent_list(mcollections.PolyCollection, objs)
else cbook.silent_list('PolyCollection', objs)
)

@docstring._snippet_manager
Expand Down Expand Up @@ -3285,7 +3284,7 @@ def _apply_bar(
self._update_guide(objs, **guide_kw)
return (
objs[0] if len(objs) == 1
else cbook.silent_list(mcontainer.BarContainer, objs)
else cbook.silent_list('BarContainer', objs)
)

@data._preprocess('x', 'height', 'width', 'bottom')
Expand Down

0 comments on commit 667cc06

Please sign in to comment.