You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an issue with the markers in the legend when working with the built-in matplotlib plot-wrapper in pandas. The problem is also in earlier versions and the only workaround I found is using matplotlib directly.
The markers in the legend are missing, except for the last label. It however works if I don't use style=..., but the default line-plot, like in this example:
If you change it from ax.legend(handles, labels, loc='best', title=title) to a plain ax.legend(), every marker is shown correctly in the legend. However, all optional settings are then of course skipped.
There is an issue with the markers in the legend when working with the built-in matplotlib plot-wrapper in pandas. The problem is also in earlier versions and the only workaround I found is using matplotlib directly.
A small, complete example of the issue
Expected Output
The markers in the legend are missing, except for the last label. It however works if I don't use
style=...
, but the default line-plot, like in this example:Output of
pd.show_versions()
pandas: 0.19.0
nose: None
pip: 8.1.2
setuptools: 25.2.0
Cython: 0.24.1
numpy: 1.11.2
scipy: 0.18.1
statsmodels: None
xarray: None
IPython: 5.1.0
sphinx: None
patsy: None
dateutil: 2.5.3
pytz: 2016.7
blosc: None
bottleneck: None
tables: 3.3.0
numexpr: 2.6.1
matplotlib: 1.5.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: