Skip to content

Legends in plots of SeriesGroupBy lack markers #17939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fuglede opened this issue Oct 21, 2017 · 3 comments
Closed

Legends in plots of SeriesGroupBy lack markers #17939

fuglede opened this issue Oct 21, 2017 · 3 comments
Labels
Bug Duplicate Report Duplicate issue or pull request Visualization plotting

Comments

@fuglede
Copy link

fuglede commented Oct 21, 2017

Code Sample, a copy-pastable example if possible

import pandas as pd
df = pd.DataFrame({'y': [2, 5, 6, 4, 4, 2], 'cat': list('ABABAB')})
df.groupby('cat')['y'].plot(style='-o', legend=True)

actual2

Problem description

Only one of the two legends include the circular marker. This becomes particularly problematic if one uses style='o':

actual3

Expected Output

The circular marker should appear for each of the groups.

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None
python: 3.6.2.final.0
python-bits: 64
OS: Windows
OS-release: 8.1
machine: AMD64
processor: Intel64 Family 6 Model 61 Stepping 4, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None

pandas: 0.20.3
pytest: 3.2.1
pip: 9.0.1
setuptools: 34.1.0
Cython: 0.26
numpy: 1.13.1
scipy: 0.19.1
xarray: None
IPython: 6.1.0
sphinx: 1.6.2
patsy: 0.4.1
dateutil: 2.6.1
pytz: 2017.2
blosc: None
bottleneck: 1.2.1
tables: 3.2.2
numexpr: 2.6.2
feather: None
matplotlib: 2.0.2
openpyxl: 2.4.8
xlrd: 1.0.0
xlwt: 1.2.0
xlsxwriter: 0.9.8
lxml: 3.8.0
bs4: 4.6.0
html5lib: 0.9999999
sqlalchemy: 1.1.13
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
pandas_gbq: None
pandas_datareader: 0.5.0

@TomAugspurger
Copy link
Contributor

I suspect that this shares the same underlying issue as #14958, but we'll leave this open too to make sure.

@fuglede do you have a chance to dig into the plotting code to see what's going wrong?

@TomAugspurger TomAugspurger added the Visualization plotting label Oct 22, 2017
@TomAugspurger TomAugspurger added this to the Next Major Release milestone Oct 22, 2017
@jreback
Copy link
Contributor

jreback commented Oct 22, 2017

dupes #14563

@jreback jreback added the Duplicate Report Duplicate issue or pull request label Oct 22, 2017
@fuglede
Copy link
Author

fuglede commented Oct 23, 2017

Indeed it does; apologies for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Duplicate Report Duplicate issue or pull request Visualization plotting
Projects
None yet
Development

No branches or pull requests

3 participants