Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

'unused' axis not drawn in plot

Hi there,

I would like to draw axes, even if they are not used for any actual data drawing. However, they just won’t show up.

See https://codepen.io/anon/pen/zLpPeg

How do I make Plotly draw them?

Thanks!

Unfortunately, you have to attach a trace (albeit invisible) for a given axis to be considered visible (see example here -> https://codepen.io/etpinard/pen/gjexdX?editors=1010). Note that the no-trace case (see https://codepen.io/etpinard/pen/bjvrmj?editors=1010) is an exception, where we still draw a plot xy subplot.

… arguably this is something we could change in v2, but things could get complicated when moving a trace from one subplot type to another e.g. when restyling a contour trace to a surface trace.

Thanks, that certainly solved my isssue!

1 Like