Logarithmic coloraxis in heatmaps not working as documented

Hi!

I’m trying to create a simple heatmap with a logarithmic colorscale. The documentation for dtick in coloraxis says:

If the axis type is “log”, then ticks are set every 10^(n"dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, … set dtick to 1.

I can’t get this to work and research showed others have this problem as well.

I created a minimal codepen, showing the (not working) logarithmic colorscale:

Am I doing something wrong or is this a bug/not implemented? Should I create a github issue for this?

Thanks for your help,
Martin

I was one of those who had the problem :slightly_smiling_face: I no longer work on that project but my recollection is that we ended up having to create a custom color bar with more ticks so that the bar looked OK for a logarithmic range. Not exactly ideal but it was hoped that a new version of plotly would emerge with a working color scale.

Thanks for your response naskew!

Yeah, that’s also my workaround I was thinking of. There is Logarithmic Color scale with Graph Objects, which shows how to change colors in a logarithmic way. However, the distribution on the colorbar is still linear.

It really seems, a logarithmic colorbar is just not implemented yet :frowning: