-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
colorbar with dates #17447
Copy link
Copy link
Open
Labels
New featurekeepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: units and array ducktypes
Metadata
Metadata
Assignees
Labels
New featurekeepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: units and array ducktypes
When using a datetime vector for color mapping a plot, the colorbar treats it as a numerical vector where units are nanoseconds. You can see this in this discussion. It is possible however, to change the scale so that it shows human readable dates, but it's quite cumbersome and I had to try many times before finding a working solution here.
I think that the colorbar, in these cases, should have a readable scale by default, and matplotlib already uses it when one of the axes of a plot is datetime, so I think it should be natural to adopt it also for colorbars. Let me know if you agree
My matplotlib version
print(matplotlib.get_backend())):module://ipykernel.pylab.backend_inlineI have installed python from default anaconda package