Custom title when multiple coordinate system present and no coordinate system specified
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- data-visualization
Rechercherichtung
Beginne beim Einstiegspunkt pl.show() und verfolge, wie die Standardwerte für coordinate_systems ausgewählt werden, wenn ein Objekt über ein oder mehrere Koordinatensysteme verfügt. Als abgeschlossen gilt die Aufgabe, wenn der Standardwert das einzige System oder das globale System auswählt, bei einem ungültigen Standardwert einen Fehler mit den verfügbaren Systemen auslöst und Aufrufern weiterhin erlaubt, explizit eine Liste zu übergeben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
When there is a object with 2 coordinate systems and pl.show() is called without specifying coordinate_systems, by default two subplots are created. If the user adjust the title=, both titles are changed, leading to a plot that is confusing, especially if it was not clear that the object (or an element of the object) was aligned to multiple coordinate systems.
This is exactly what happened in the following plots (that appeared from a bug reported by a user).
before setting the title
after setting the title
not sure why the order changes but no big deal, not the point of this issue
solution for this case
Solution for the user: here the fix is to specify coordinate_systems='global', which will lead to a single plot.
proposed solution
Discussed also with @melorona. I proposed to change the default behavior as follows:
coordinate_systemswill have a new default ofNone.- if the object has a single coordinate system and
coordinate_systemisNone, this will be plotted - elif the object has multiple coordinate system and
coordinate_systemisNoneand one of them is called'global'(defined infrom spatialdata.models._utils import DEFAULT_COORDINATE_SYSTEM), this will be plotted - if
coordinate_systemis notNoneandcoordinate_systemis available, this will be plotted - else (i.e. if
coordinate_systemisNone, multiple coordinate systems are present and none of them is called'global', or ifcoordinate_systemis notNoneand it's not available in the data, then an error will be raised, printing the list of available coordinate systems.
What will change for the user:
- with this change, by default we won't plot multiple coordinate systems; if this is still the desired behavior, the user can still pass a list of coordinate systems.
Extra comments:
- with the incoming "transformations refactoring" it will be required to specify which coordinate system to plot because elements will not contain an explicit list of coordinate systems they are aligned to but there will only be a big graph of transformations where a lot of coordinate systems can be aligned to a lot of other coordinate systems. So it will be important to plot only what the user asks for
- in general, the current default behavior is useful when there are multiple FOVs for a dataset (like in the MIBITOF example dataset); but in other cases where there is the same data in multiple coordinate systems, like in Xenium, or where the number of FOVs is very large, like in CosMx, the currently implemented default behavior is suboptimal, and requiring the proposed new default would be handier.
- Vorherrschende Sprache
- Python
- Sterne
- 86
- Forks
- 21
- Ø Merge
- 14 Std. 50 Min.
- Gemergte PRs (30 T.)
- 3
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus scverse/spatialdata-plot
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
scverse/spatialdata-plot#775 ·
-
bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
scverse/spatialdata-plot#777 ·
-
`pl.show()` leading to `ValueError` due to mismatch between number of axes and number of panels Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
scverse/spatialdata-plot#749 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
scverse/spatialdata-plot#747 ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 45/100
scverse/spatialdata-plot#677 ·
Alle Issues in scverse/spatialdata-plot
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100