Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BUG: Fixed issue with bar plots not stacking correctly when 'stacked' and 'subplots' are used together #61340

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

Merged
merged 19 commits into from
Apr 28, 2025

Conversation

eicchen
Copy link
Contributor

@eicchen eicchen commented Apr 23, 2025

Added check for when stacked and subplots are used in conjunction for bar plots. And logic dictating offsets for individual subplots to account for plots with non-concurrent columns being graphed.

Currently, does not take into account column order in subplot entry (eg: (A, B) vs (B, A)) when stacking

pandas/plotting/_matplotlib/core.py Outdated Show resolved Hide resolved
pandas/plotting/_matplotlib/core.py Outdated Show resolved Hide resolved
pandas/tests/plotting/test_misc.py Outdated Show resolved Hide resolved
pandas/tests/plotting/test_misc.py Outdated Show resolved Hide resolved
pandas/tests/plotting/test_misc.py Outdated Show resolved Hide resolved
@mroeschke mroeschke added the Visualization plotting label Apr 23, 2025
pandas/plotting/_matplotlib/core.py Outdated Show resolved Hide resolved
pandas/plotting/_matplotlib/core.py Outdated Show resolved Hide resolved
@mroeschke mroeschke added this to the 3.0 milestone Apr 28, 2025
@mroeschke mroeschke merged commit 65bf9cd into pandas-dev:main Apr 28, 2025
42 checks passed
@mroeschke
Copy link
Member

Thanks @eicchen02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: df.plot() "Subplots" changes behavior of how values are stacked using the "Stacked" property
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.