Enable logscale Colorbar - #7894
bmaranville wants to merge 10 commits into
Conversation
…lt) 'linear' and 'log'
…max (fall back to linear scale)
|
Note that one of the tests that is failing only because this PR introduces a minimal change to the plotly schema ( Also: this addresses plotly/plotly.py#3616 and plotly/plotly.py#3735 |
|
Thanks for the PR! This would be a great addition. Our team will take a look and follow up. |
|
@alexcjohnson Do you think |
|
Thanks @bmaranville, this is a great feature! But yes I think @emilykl is on the right track that this is not a property of the Does make the naming a little awkward, but |
Closes plotly/plotly.py#3616
Implement logscale colorbars natively
Motivation
This feature has been requested a number of times (see #7376 and https://community.plotly.com/t/logarithmic-coloraxis-in-heatmaps-not-working-as-documented/90650/5?u=matinh, for example) and our organization uses logarithmic scaling almost exclusively as the default scale for colormaps for
heatmapplots, but it is currently awkward to have to manually set tick labels as suggested in the docs here:https://plotly.com/python/colorscales/#customizing-tick-text-on-logarithmic-color-bars
Implementation
This PR
colorbar.typeto be an enum with values['linear', 'log'], defaulting to 'linear'Note
this PR was prepared with the assistance of Gemini AI (but edited and audited thoroughly by the human me). The AI was particularly helpful in writing tests.
With this PR, the following trace:
renders like this:
