Description
We could be smarter about axis anchors for subplots, basing their default values off the traces we have.
In a new mock I made for date axes, there are 7 stacked subplots, each with one trace and its own x and y axes. All the traces have:
xaxis: 'x<n>', yaxis: 'y<n>'
and all the x axes have layout obects:
xaxis<n>: {anchor: 'y<n>'}
With smarter defaults, I would not have needed to include these x axis objects at all since 'x<n>'
is only ever used with 'y<n>'
in the data. In fact, in principle my y axes should also be anchored to the corresponding x axes... I didn't do that, and it didn't matter here because all the x axes have domain [0, 1]
, but if I were to change some of these domains, then I would be in for some confusion as the y axes wouldn't move as I would expect.
This would not be backward compatible, so I guess should be included in v2.0 if we do it, but I can't really think of a situation where people would be depending on the existing defaults.