I don’t like how the colorbar’s labels are cut off by the plot edge. Is there a way to tell the plotting package to use scientific notation for the colorbar contour labels? I know there’s xformatter/yformatter=:scientific but I can’t find anything for the colorbar.
I don’t mind using plotly, but I really don’t like the nano/mico suffix on the colorbar and would still prefer scientific notation. Do you know if this is possible with Plotly?
Hmm yeah I get the same thing when calling PyPlot directly instead of using Plots.jl, so it seems like the Plots.jl wrapper is customizing the plot environment in some way. If I figure out anything further I’ll be sure to update here.
I asked in the Slack I learned that @isentropic (sorry if not the same isentropic) is working on this kind of enhancements here: https://github.com/JuliaPlots/Plots.jl/pull/3346
That PR has had a lot of activity recently so it seems like something good could come out soon!
Perhaps it’s too late to give another solution, but I post it here as an alternative. With PlotlyJS.jl you can customize better the plot appearance. In your case setting colorbar_exponentformat =“power” or colorbar_exponentformat=“e” you get what you’d like to be displayed as ticklabels:
using PlotlyJS
z = rand(10,10) / 1e6
trace=contour(z=z', colorbar_thickness=23,
colorbar_exponentformat="power")
pl=plot(trace, Layout(width=400, height=350))
display(pl)
respectively:
Note that the transpose, z’, is necessary instead z, because of the major order used by plotly.js to serialize the arrays.