support UnitRegistry.setup_matplotlib

Offen
#91 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
matplotlib, python

Rechercherichtung

Start with the .plot accessor and trace how single plots and facet grids obtain values through DataArray.values or DataArray.to_masked_array. Compare those paths with UnitRegistry.setup_matplotlib(); done means plotting without dequantifying preserves quantities so matplotlib can use its registered converter in both cases.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Right now, trying to use the .plot accessor without dequantifying first will strip the units so matplotlib never sees the quantities and can't use the converter registered by UnitRegistry.setup_matplotlib(). This happens for both single plots and facet grids, either because of DataArray.values or by converting to a masked array using DataArray.to_masked_array.

cc @jthielen

Vorherrschende Sprache
Python
Sterne
120
Forks
17
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus xarray-contrib/pint-xarray

Alle Issues in xarray-contrib/pint-xarray

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.