Skip to content

Conversation

@andrewendlinger
Copy link
Contributor

@andrewendlinger andrewendlinger commented Mar 29, 2025

- appended test to `TestFacetGrid` class inside test_plot.py
- checks that units are added to the plot axis labelling
- Fixed an issue where axis labels for FacetGrid plots did not display
units when provided.
- Now, both the dimension name and its corresponding unit (if available)
are shown on the axis label.
@welcome
Copy link

welcome bot commented Mar 29, 2025

Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
If you have questions, some answers may be found in our contributing guidelines.

@dcherian
Copy link
Contributor

Wonderful, thank you. Mind adding a note to whats-new.rst please?

@dcherian dcherian added the plan to merge Final call for comments label Mar 29, 2025
@andrewendlinger
Copy link
Contributor Author

great. sure!

@dcherian dcherian enabled auto-merge (squash) March 29, 2025 18:03
@dcherian dcherian merged commit 61d4e26 into pydata:main Mar 29, 2025
30 checks passed
@andrewendlinger andrewendlinger deleted the imshow-with-units branch March 29, 2025 19:24
dcherian added a commit to ilan-gold/xarray that referenced this pull request Mar 29, 2025
* main:
  Vendor pandas to xarray conversion tests (pydata#10187)
  Fix: Correct axis labelling with units for FacetGrid plots (pydata#10185)
  Use explicit repo name in upstream wheels (pydata#10181)
  DOC: Update docstring to reflect renamed section (pydata#10180)
Mikejmnez pushed a commit to Mikejmnez/xarray that referenced this pull request Apr 12, 2025
)

* Add test to check units appear in FacetGrid plot

- appended test to `TestFacetGrid` class inside test_plot.py
- checks that units are added to the plot axis labelling

* fix: ensure axis labels include units in FacetGrid plots

- Fixed an issue where axis labels for FacetGrid plots did not display
units when provided.
- Now, both the dimension name and its corresponding unit (if available)
are shown on the axis label.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* added whats-new documentation

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plan to merge Final call for comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FacetGrid plots drop units for

2 participants