FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

DOC: Fix the bars having numeric value of cm but labeled as inches by ksunden · Pull Request #25518 · matplotlib/matplotlib · GitHub

Repository navigation

DOC: Fix the bars having numeric value of cm but labeled as inches - #25518

Merged
timhoffm merged 1 commit into
matplotlib:mainfrom
ksunden:bar_demo_units
Mar 23, 2023
Merged

timhoffm merged 1 commit into
matplotlib:mainfrom
ksunden:bar_demo_units

Conversation

ksunden commented Mar 20, 2023

Copy link
Copy Markdown
Member

This is admittedly more of a band-aid than a proper fix, but at least
make the generated figure correct.

The underlying problem is the more fundemental one of inconsistent units
behavior in which some artists can be re-united after plotting (e.g.
Line2D), while many others (e.g. Collections) cannot.

Thus, until that is addressed (which is one of the goals of the
data-prototype work), simply setting units early is as good as we can
do.

Closes #5051

PR Summary

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

This is admittedly more of a band-aid than a proper fix, but at least
make the generated figure correct.

The underlying problem is the more fundemental one of inconsistent units
behavior in which some artists can be re-united after plotting (e.g.
Line2D), while many others (e.g. Collections) cannot.

Thus, until that is addressed (which is one of the goals of the
data-prototype work), simply setting units early is as good as we can
do.

Closes matplotlib#5051
ksunden added this to the v3.7-doc milestone Mar 20, 2023

ksunden commented Mar 20, 2023 •
edited
Loading

Copy link
Copy Markdown
Member Author

Current version (the dataset changed from 3.6 to 3.7 here, but the units misbehavior was retained): https://matplotlib.org/3.7.0/gallery/units/bar_unit_demo.html

Note that the values are set in cm, but the units are supposed to be "inches", but the plotted values are the same as the cm values.

jklymak commented Mar 21, 2023

Copy link
Copy Markdown
Member

I'm 95% sure unit re-setting is possible only for Line2D, and was never implemented for anything else.

timhoffm merged commit c948e90 into matplotlib:main Mar 23, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Mar 23, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Mar 23, 2023
oscargus added a commit that referenced this pull request Mar 23, 2023
…518-on-v3.7.1-doc

Backport PR #25518 on branch v3.7.1-doc (DOC: Fix the bars having numeric value of cm but labeled as inches)
oscargus added a commit that referenced this pull request Mar 23, 2023
…518-on-v3.7.x

Backport PR #25518 on branch v3.7.x (DOC: Fix the bars having numeric value of cm but labeled as inches)

hamogu commented Mar 23, 2023

Copy link
Copy Markdown
Contributor

closed a 4-digit issue. Yeah!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Units example broken

4 participants


Back | FazBrowse Home | New Git URL