I have the following requirements for my heatmap:
- All axis labels should be visible no matter how much rows and columns there are (solved with: axis -> dtick =1)
- Very long axis labels should also be completely visible (solved with: axis -> automargin = true)
- I want all the elements in the heatmap to be square, I have set scaleanchor = x on the yaxis to make this happen.
The problem I’m facing now is that the graph size is much larger than the actually heatmap (autosize on the Layout is still true). I could manually tweak the height on the layout to something more appropriate, but I want something automatic, since I won’t know beforehand how many rows/columns there are going to be.
This example shows the problem, the graph is too high, completely disconnecting the x-axis from the heatmap: