Plotly html file - autoscale vs reset axes

Hello,

Can someone explain the difference between ‘autoscale’ and ‘reset axes’ in the context of a plotly html file (a heatmap in my case)? They seem to achieve the same thing for me (namely, resetting the figure to the most zoomed out perspective).

Here is a picture showing what i mean:

Thanks,
Tim

Hi @TimothyK !

I think that with a heatmap it would only make sense if, by default, you had some part of the plot hidden. Otherwise both buttons will have the same effect. The difference between them is that autoScale looks at all the points/data in the plot and changes the layout to show all of them, while resetAxes goes back to the layout details that you have specified for your figure, even if that leaves some points out.

It’s easier to understand with a scatter plot. Look here the difference when I comment and uncomment the update_xaxes (where I ‘restrict’ the range): autoScale vs resetAxes

I hope this helps!

1 Like

Perfect, thanks for the help and the work-through!

Hello, I need a help with plotly autoscale. My dashboard has a graph, and am applying custom range on it . But when the autoscale is pressed, the graph is being set to plotly’s default range. I tried to capture the event of autoclick with “relayoutData” property of the graph, so that, even if one pan the graph, and press autoscale, my custom range is applied. However, when the aotoscale is pressed again, the graph is back to default range. and more over, the last autoscale is not even being recognised by “relayoutData”. Can I get some guidance on how this works?
Thanks in advance.

1 Like