Skip to content
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

Fix dimensionless unit formatting #19

Merged
merged 2 commits into from
Oct 28, 2024
Merged

Conversation

juntyr
Copy link
Contributor

@juntyr juntyr commented Oct 8, 2024

pint, unlike cf-units, collapses dimensionless units. The current formatting then returns a "$$" label, which matplotlib cannot handle correctly. The fix checks for dimensionless units explicitly.

@JamesVarndell JamesVarndell merged commit a64da93 into ecmwf:develop Oct 28, 2024
7 checks passed
@juntyr juntyr deleted the patch-3 branch October 28, 2024 11:28
JamesVarndell added a commit that referenced this pull request Nov 17, 2024
* 12 support non latlon grib grids (#16)

* Adds support for non-lat-lon GRIB data points

* Re-enable automatic legend titles with proper fallback if no metadata found

* QA tweaks

* Rollback version of micromamba used with unit tests to v12

* Testing latest micromamba

* Migrate to new setup-micromamba

* Improve levels auto_range with proper symmetry (#17)

* Improve levels auto_range with proper symmetry

* Ensure symmetry around arbitrary divergence point

* Removes obsolete math import

---------

Co-authored-by: James Varndell <[email protected]>

* Fix datetime metadata for xarray for single-time datasets (#18)

* Only check for unstructured grid if normal plotting fails

* Adds convience save function at subplot level

* Fix earthkit mutably messing up an xarray's longitude (#22)

* Fix dimensionless unit formatting (#19)

* Fix dimensionless unit formatting

* Update src/earthkit/plots/metadata/units.py

Co-authored-by: James Varndell <[email protected]>

---------

Co-authored-by: James Varndell <[email protected]>

* Adds plugin support for Python 3.9 (#23)

* Feature/interactive plots (#25)

* Moves interactive plots into earthkit.plots.interactive

* Adds plotly to requirements

* Moves interactive plots into earthkit.plots.interactive

* Remove empty notebook

* QA tweaks

* Adds default style to improve look and feel with >5 quantiles

* Adds default style to improve look and feel with >5 quantiles

* Adds docstrings

* Adds tests for interactive plots

* QA tweaks

* Feature/vertical plots (#26)

* Moves interactive plots into earthkit.plots.interactive

* Adds plotly to requirements

* Moves interactive plots into earthkit.plots.interactive

* Remove empty notebook

* QA tweaks

* Adds default style to improve look and feel with >5 quantiles

* Adds default style to improve look and feel with >5 quantiles

* Adds docstrings

* Adds tests for interactive plots

* QA tweaks

* Adds better support for interactive vertical plots

---------

Co-authored-by: Juniper Tyree <[email protected]>
JamesVarndell added a commit that referenced this pull request Nov 19, 2024
* 12 support non latlon grib grids (#16)

* Adds support for non-lat-lon GRIB data points

* Re-enable automatic legend titles with proper fallback if no metadata found

* QA tweaks

* Rollback version of micromamba used with unit tests to v12

* Testing latest micromamba

* Migrate to new setup-micromamba

* Improve levels auto_range with proper symmetry (#17)

* Improve levels auto_range with proper symmetry

* Ensure symmetry around arbitrary divergence point

* Removes obsolete math import

---------

Co-authored-by: James Varndell <[email protected]>

* Fix datetime metadata for xarray for single-time datasets (#18)

* Only check for unstructured grid if normal plotting fails

* Adds convience save function at subplot level

* Fix earthkit mutably messing up an xarray's longitude (#22)

* Fix dimensionless unit formatting (#19)

* Fix dimensionless unit formatting

* Update src/earthkit/plots/metadata/units.py

Co-authored-by: James Varndell <[email protected]>

---------

Co-authored-by: James Varndell <[email protected]>

* Adds plugin support for Python 3.9 (#23)

* Feature/interactive plots (#25)

* Moves interactive plots into earthkit.plots.interactive

* Adds plotly to requirements

* Moves interactive plots into earthkit.plots.interactive

* Remove empty notebook

* QA tweaks

* Adds default style to improve look and feel with >5 quantiles

* Adds default style to improve look and feel with >5 quantiles

* Adds docstrings

* Adds tests for interactive plots

* QA tweaks

* Feature/vertical plots (#26)

* Moves interactive plots into earthkit.plots.interactive

* Adds plotly to requirements

* Moves interactive plots into earthkit.plots.interactive

* Remove empty notebook

* QA tweaks

* Adds default style to improve look and feel with >5 quantiles

* Adds default style to improve look and feel with >5 quantiles

* Adds docstrings

* Adds tests for interactive plots

* QA tweaks

* Adds better support for interactive vertical plots

* Bugfix/numpy input (#29)

* Adds numpy array plotting example

* Fixes bug when detecting z-values from numpy input

* Fixes bug when detecting x and y from irregular grid data

* Adds extra test for numpy z-detection from data argument

---------

Co-authored-by: Juniper Tyree <[email protected]>
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.

2 participants