For the code
p = make_subplots(
rows=2,
cols=1,
shared_xaxes=true,
)
add_trace!(p, scatter(y=1:2), row=1, col=1)
add_trace!(p, scatter(y=1:2), row=2, col=1)
relayout!(
p,
template="plotly_white",
)
relayout!(
p,
xaxis=attr(showlines=true, mirror=true, linewidth=2),
yaxis=attr(showlines=true, mirror=true, linewidth=2, linecolor="red"),
)
I would have expected that the second relayout!
updates the layout, but instead it seems to be reset. How can I prevent this?
(In Python one would first set the template default with
import plotly.io as pio
pio.templates.default = "plotly_white"
then this doesn’t seem to happen. Unfortunately I couldn’t find an equivalent command in Julia yet.)