How to set log scale for z axis on a heatmap?


#1

Hi,

Is it possible to set log scale for a Z axis on a heatmap?

I’ve tried it this way, but Z axis is still linear:

import plotly.graph_objs as go
data = [
    go.Heatmap(
        z=[[1, 200, 3000, 500, 1], [20000, 1, 60, 80, 30], [30, 60, 1, -10, 20]],
        x=['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
        y=['Morning', 'Afternoon', 'Evening'],
    )
]
py.offline.iplot(dict(data=data, layout={'scene': {'zaxis': {'type': 'log'}}}))

Any help or direction is much appreciated.


#2

plotly heatmaps only support linear z scales at the moment.


#3

I think logs scales are now possible with python plotly as shown in this plotly example

I stumbled across the example as I am trying to figure out how to do the same but in JavaScript