You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the if statement above may be removed to keep the default logic only in Axis. Right now one can pass a callable directly (although that's not documented), and the default behaviour from #16715 is triggered. However, I guess making this change for format strings would imply a deprecation cycle, as it breaks current behaviour. Another option would be to check in Axis._set_formatter for what kind of string format we've been passed (unsure how, although there must be way).
Additional context and prior art
No response
The text was updated successfully, but these errors were encountered:
Problem
At the moment, the default format strings in colorbar are old style ones, as in their init there is:
matplotlib/lib/matplotlib/colorbar.py
Lines 489 to 492 in 67e1814
which is a different convention from the one of a normal axis, which was introduced in #16715.
Proposed solution
As in
update_ticks
we pass the colorbar's formatter to the long axis,matplotlib/lib/matplotlib/colorbar.py
Line 801 in 67e1814
the
if
statement above may be removed to keep the default logic only inAxis
. Right now one can pass a callable directly (although that's not documented), and the default behaviour from #16715 is triggered. However, I guess making this change for format strings would imply a deprecation cycle, as it breaks current behaviour. Another option would be to check inAxis._set_formatter
for what kind of string format we've been passed (unsure how, although there must be way).Additional context and prior art
No response
The text was updated successfully, but these errors were encountered: