-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
new behavior regarding Series.plot.bar
for logy=True
in 0.21
#18394
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
Comments
Bumped into the same issue. You can pass a
|
@PMeira Why was the behavior of Series.plot.bar changed to plot bars with different color. Visually these colors add nothing and add to clutter in the chart. Different colors should only be used when they correspond to differences of meaning in the data. Why is the default behavior to provide an unnecessarily visually overwhelming graph? It took me some time to realize why my bars suddenly started acting strangely. Now, I pass color='cornflowerblue' to get all my bars the same pleasant hue. Reference for visual appeal and the use of colors: http://www.perceptualedge.com/articles/visual_business_intelligence/rules_for_using_color.pdf |
@Deborah-Digges I completely agree, I don't quite understand the change either. Maybe a dev can enlighten us. |
Thanks @PMeira. apologies, I assumed you were a dev! |
Sorry about missing this when the issue was opened. Is anyone interested in debugging this to see where things break? We're doing a release in 2-3 weeks, would be nice to get this fixed. |
@TomAugspurger The issue is really different than the one just closed as a duplicate. The reason I raised it as a separate issue is because it's more a question of visual encoding than broken functionality. There's probably a reason the bars were made differently colored post version 0.20 and that's something I want to understand, which seems unrelated to the broken functionality that resulted because of this change(described above) |
I should be more clear in my initial post. Visual encoding is a design choice while the For the |
For the test, I'd imagine that in the broken version, That said, I can't reproduce this even with pandas 0.21.0. We'll want to make sure the issue is reproducible before writing a test for it. |
@TomAugspurger the |
@TomAugspurger , This may be old and left open, but you had previously asked for more tests that this is fixed. It appears that @pcluo is correct about the matplotlib issue. I tested with matplotlib 2.1.0 and pandas 0.22.0 and reproduced a similar issue Then I tested matplotlib 2.2.2 and pandas 0.22.0 and no issue. I also had matplotlib 2.2.2 and pandas 0.20.3 and had no issue, so I think matplotlib may be the culprit. Hope that provides some useful information! |
I think this issue can be closed. |
I think that |
Code Sample
Problem description
The behavior changed from last version, 0.20. In last version,
Series.plot.bar
uses one color for bars. In the new version, it uses different colors for bars even for a single series. When usinglogy
argument, the bars cannot be seen. It seems the fill color is same as the background color.Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.3.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.21.0
pytest: 3.2.1
pip: 9.0.1
setuptools: 36.5.0.post20170921
Cython: 0.26.1
numpy: 1.13.3
scipy: 1.0.0
pyarrow: 0.7.0
xarray: None
IPython: 6.1.0
sphinx: 1.6.3
patsy: 0.4.1
dateutil: 2.6.1
pytz: 2017.2
blosc: None
bottleneck: 1.2.1
tables: 3.4.2
numexpr: 2.6.2
feather: 0.4.0
matplotlib: 2.1.0
openpyxl: 2.4.8
xlrd: 1.1.0
xlwt: 1.3.0
xlsxwriter: 1.0.2
lxml: 4.1.0
bs4: 4.6.0
html5lib: 0.999999999
sqlalchemy: 1.1.13
pymysql: 0.7.11.None
psycopg2: None
jinja2: 2.9.6
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: 0.5.0]
The text was updated successfully, but these errors were encountered: