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

Skip to content

plotting legends none #1610

Closed
Closed
@segasai

Description

@segasai

Hi,

It looks like in matplotlib-1.2.0 the behaviour of the legend has changed with regards to the labels which are "None".
In mpl 1.1.1 this code

import matplotlib.pyplot as plt

plt.plot([0,1],label=None)
plt.plot([0.1,1.2],label='dat2')

plt.legend()

plt.savefig('out.png')

was only creating the legend for the second line (that's what I would like to see),
but in 1.2.0 this code started to produce the legend for the first line with label='None'. See attached figures. To me this looks like a regression (which breaks a lot of my plots).

Thanks

Old behaviour:
out1

New behaviour:
out2

The suggested fix is here fe63689

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions