does using display(1) #display plot for y1
and display(2) #display plot for y2 get you what you were after? On Saturday, April 25, 2015 at 8:21:24 AM UTC-7, Ferran Mazzanti wrote: > > Hi folks, > > I'm new to Julia (but not to Python) and can't find he right way to use > PyPlot as I do in Python. In short, I have a program that should display a > plot, wait for the user to close the plot, then show a second plot and g on > running. But it is not doing that: it just merges the two plots in one and > goes on. The only thing I've managed to do so far is to show the first > plot, wait for some time, then show the second plot, and go on: > > using PyPlot > > x = 1:21 > y1 = randn(21) > y2 = randn(21) > > PyPlot.show() > > PyPlot.plot(x,y1,color="red",marker="*",linestyle="none") > PyPlot.draw() > PyPlot.pause(4) > > PyPlot.close() > PyPlot.show() > PyPlot.plot(x,y2,color="blue",marker="*",linestyle="dashed") > PyPlot.draw() > > ...but this is different from what I want. If I simply do > > using PyPlot > > x = 1:21 > y1 = randn(21) > y2 = randn(21) > > PyPlot.plot(x,y1,color="red",marker="*",linestyle="none") > PyPlot.show() > PyPlot.plot(x,y2,color="blue",marker="*",linestyle="dashed") > PyPlot.show() > > it merges both plots in one, something I don't want. > > Cans omebody help me sort out this thing, or is it kind of a bug? > > Thanks a lot for your help, > > Ferran. >
