PlotlyJS.jl
PlotlyJS.jl copied to clipboard
sync zoom
When I have subplots and interact with them (zoom). the zoom on x axes not synced
using PlotlyJS
x = 1:10; y = rand(10,2);
plot([Plot(x, y[:,1]), Plot(x, y[:,1])])
plot show up like this (great)
However, then I zoom on one of the subplots, another one(s) keep their timescale intact
I maybe not a bug, but (me) missing default/option set.
Actually one solution could be like this. It solves the zoom problem
x = 1:10; y = rand(10,2);
p = [Plot(x, y[:,1]), Plot(x, y[:,2])]
p.data[2][:xaxis] = "x1"
plot(p)
however, labels on x are gone (you get to see them on the top and then hover over). Ideally one of course would love to keep them
Hi @anj00 thanks for posting.
Glad you were able to find the “shared x axis” fix. I’m not aware of another way to do this, but will try to take a look. It will likely take a few days before I have the time.
Because this is a feature of the plotly JavaScript library, you might find better or more insightful help by posting the community discussion board: https://community.plot.ly