I am trying to create a plot with 3 properties:
- Responsive to changes in window size (don’t want to hardcode
height
andwidth
) - Has axes that have uniform scale (one unit is the same number of pixels in both axes)
- does NOT have zoom enabled (
fixedrange:true
for both axes).
I have tried setting scaleanchor
and fixedrange
but it is my understanding scaleanchor
doesn’t work if fixedrange
is set to true
.
Here is an example figure:
var figure = { "frames": [], "layout": { "autosize": true, "xaxis": { "range": [1.5, 6.5], "type": "linear", "domain": [0,1], "autorange": true, "fixedrange": true, }, "yaxis": { "range": [1.5, 6.5], "type": "linear", "domain": [0,1], "scaleanchor": "x", "autorange": true, "fixedrange": true, } }, "data": [ { "zmax": 0.9221846392818049, "zmin": 0.09501206638418558, "y": [2, 3, 4, 5, 6], "x": [2, 3, 4, 5, 6], "z": [ [0.5, 0.8, 0.6, 0.8, 0.2], [0.4, 0.3, 0.7, 0.2, 0.1], [0.7, 0.5, 0.9, 0.5, 0.3], [0.5, 0.8, 0.6, 0.8, 0.2], [0.4, 0.3, 0.7, 0.2, 0.1], ], "type": "heatmap", "zauto": true } ] }
Any help appreciated.