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
I have a DataFrame like the one above. I use the groupby function to get the average of one specific category and a column called 'step' that is the same between different categories. When I try to plot the query results I used the unstack function to get the index to columns and then plot each column. This works, but the colors of the figure do not correspond to the ones on the label.
A quick fix is to set each color manually.
Code Sample, a copy-pastable example if possible
Problem description
I have a DataFrame like the one above. I use the groupby function to get the average of one specific category and a column called 'step' that is the same between different categories. When I try to plot the query results I used the unstack function to get the index to columns and then plot each column. This works, but the colors of the figure do not correspond to the ones on the label.
A quick fix is to set each color manually.
Expected Output
Same colors from legend.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.4.final.0
python-bits: 64
OS: Darwin
OS-release: 17.4.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.22.0
pytest: None
pip: 9.0.1
setuptools: 38.5.0
Cython: None
numpy: 1.14.0
scipy: None
pyarrow: None
xarray: None
IPython: 6.2.1
sphinx: None
patsy: None
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.1.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 1.0.1
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: