Edited: now, with a MWE that can be replicated
Hi,
I need to create a figure with some subplots, like the following one:
The code I used is this:
using PlotlyJS
p1 = make_subplots(rows=2, cols=2,
specs=[Spec(colspan=2) missing ; Spec() Spec()],
subplot_titles=["First subplot" "Third subplot" ; "Second subplot" missing],
vertical_spacing = 0.1, horizontal_spacing = 0.09 )
add_trace!(p1, scatter(x=1:5, y=rand(5)), row=1, col=1)
add_trace!(p1, scatter(x=1:5, y=rand(5)), row=2, col=1)
add_trace!(p1, scatter(x=1:5, y=rand(5)), row=2, col=2)
relayout!(p1, showlegend=true, title_text = "Central bank losses",
height = "800", hovermode = "x" )
p1
I do not know whether forcing the two yaxis_ranges
to have the same range is possible. In this case, I need a visual comparison; the same yaxis_ranges are essential.
Another doubt I have is whether it is possible to have different yaxis_titles
(or xaxis_titles
) in individual subplots (not in this example, but sometimes they are needed for specific purposes).
I did my best to achieve what I needed by looking here and here, and also in some other places. But with no success.
Thanks.