Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bf40319

Browse files
committed
Fixes plotly#384
1 parent 204a048 commit bf40319

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plotly/matplotlylib/mplexporter/exporter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ def crawl_legend(self, ax, legend):
162162
if isinstance(child, matplotlib.patches.Patch):
163163
self.draw_patch(ax, child, force_trans=ax.transAxes)
164164
elif isinstance(child, matplotlib.text.Text):
165-
if not (child is legend.get_children()[-1]
166-
and child.get_text() == 'None'):
165+
if (child is not legend.get_children()[-1]
166+
and child.get_text() != 'None'):
167167
self.draw_text(ax, child, force_trans=ax.transAxes)
168168
elif isinstance(child, matplotlib.lines.Line2D):
169169
self.draw_line(ax, child, force_trans=ax.transAxes)

0 commit comments

Comments
 (0)