You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is largely an issue with the plotly workspace, but I imagine other applications can run into it as well:
If you change trace types between different subplots, for example from heatmap to surface, bar to pie, it's possible to end up with an empty subplot (cartesian in those cases, but could be others) that nevertheless exists in layout, with automatically-entered attributes like range and autorange but possibly with explicitly-provided attributes as well. At present we still display these subplots, even though they're useless.
Only show subplots that are referenced by some object - be it a trace, shape, annotation, or image.
Even hidden objects (visibility: (false|'legendonly')) count as a subplot reference. So a subplot that's blank just because you turned off all the traces on it from the legend, that will still render.
If there are no subplots left after we axe all of these, make a blank cartesian subplot so it's not just blank.
Do not delete the unused axis and subplot objects from layout, in case the user changes back to the original type, so they don't lose the configuration they did there.
In principle this could be regarded as a breaking change, but in practice it seems like the only thing it breaks is useless plots. If anyone has examples otherwise though I'd love to hear about it!
Activity
rreusser commentedon Oct 26, 2017
You probably know this @alexcjohnson, but I had to work through it. Here's the minimal example where it's apparent:
xaxisandyaxismust both be specified for the axis to show up. I missed that at first.etpinard commentedon Oct 26, 2017
The proposal is very nice.
Referencing