Format color scale ticks in contourf (Plots.jl)

In Plots.jl it is possible to specify a formatter axis attribute to customize the ticks format.
I.e. to show the ticks in scientific notation, one can pass formatter=:scientific.
It is also possible to format one single axis by passing, e.g. xformatter=....

I am trying to format the color scale in in contourf(...) plots but I couldn’t find any way to make it work.
E.g. if I try:

using Plots; pyplot()
contourf(rand(50,10), formatter=:scientific)

I get scientific notation on both the x/y-axes but not on the color scale.
I even tried:

contourf(rand(50,10), zformatter=:scientific)
contourf(rand(50,10), cformatter=:scientific)

but the ticks for the color scale remain unaffected.

Is it possible to pass a formatter for the color scale? If so, how?

Thanks :slight_smile:

1 Like