-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[ENH] Unit support for ScalarMappables #7383
Copy link
Copy link
Open
Labels
API: changesChanges to the public API, typically requiring deprecation.Changes to the public API, typically requiring deprecation.New featurekeepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: categoricaltopic: units and array ducktypes
Milestone
Metadata
Metadata
Assignees
Labels
API: changesChanges to the public API, typically requiring deprecation.Changes to the public API, typically requiring deprecation.New featurekeepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: categoricaltopic: units and array ducktypes
Type
Fields
Give feedbackNo fields configured for issues without a type.
In #6934 (categorical colormapping), I'm trying to add support for imshow visualizing arrays of strings ('cause strings are data...) and then creating the associated colorbar and eventually a legend.
What I've run headlong into (and has created spaghetti code) is that imshow doesn't support unit conversions, which sort of makes sense as norms dictate how things should be colored but it also creates this weird circular dependencies of sorts on how the data gets coded when it's time to also set up the colorbars 'cause of how ticks/locators are done there (still super confused on all that).
I'd really like to add that sort of "unit" knowledge to imshow (or its underlying object).
The plan is to:
Edit: Can't decide the name 'cause this is an issue for anything that takes a colorbar, which is both the AxesImage objects and stuff like scatter.
2) use units in the underlying imshow code in the manner it's currently used in the plot code.
I think this could also maybe be used to later refactor the colorbar code or norms or something. And possibly codifying what's the defaults for floats and ints and the like-basically unit becomes a stylesheet of sorts for data.