Create two unrelated plots in one script

The following script generates two unrelated plots that I desire to place into one plot pane, or possibly two plot panes. I do not want them to lay on top of each other because they are unrelated ie. (sub plots will not work).

My environment is: Windows, Atom, Plots, and plotlyjs.

using Plots
plot(Plots.fakedata(50,5),w=3, show = true)
plot([sin,cos], 0, 2*π, show = true)

I have tried all kinds combinations to get the two plots in one gui() window, or one plot in each of two gui() windows. As I recall from R, and RStudio you could name your plot panes and put a separate plot in each one. I tried this in Julia, but it does not seem to work. In my example script above the the second plot replaces the first plot after 20 seconds which is strictly a work around.

Can anyone provide input on how this might be accomplished…Thanks Archie

1 Like

I’m a little confused. You want them next to each other, but you don’t want them next to each other. Which is it? Fyi you can put them stacked or side by side even if they’re completely unrelated. Just plot(p1, p2)

Also reuse = false should bring up a second window if thats what you wanted.

1 Like

I do not want them side by side. It looked like if the use Sub Plots in a
vertical fashion it used a common X Axis which will not work because the
plots are unrelated…Archie

I will try reuse = false and get back to you…Thanks…Archie

No only if you link the axes. Should work fine for you.

1 Like

This works but I’m having a difficult time placing the individual legends on each plot. I will go back to only having one plot per script. Thanks for helping.