Oh, now I see that just by copying plot_5 with a new name plot_6 and replacing
plot( plot_1, plot_2, plot_3, plot_4, plot_5, plot_5, layout = lay ) with plot( plot_1, plot_2, plot_3, plot_4, plot_5, plot_6, layout = lay ), it works. But IT IS a bug, there is no reason why should not be able to repeat a plot. You are supposed to be able to plot whatever you want, isn't it? And if you think it makes not sense, then at least one should document it. I could think of many situations where the same plot is repeated... for instance, when learning how to arrange several plots together, and you do not worry about what you plot, just want to see the final arrangement. But if you still think it does not make sense what I say (why not?), it doesn't hurt to document the limitations... Cheers, Ferran. On Monday, November 14, 2016 at 2:50:13 PM UTC+1, Tom Breloff wrote: > > The behavior is currently undefined if you pass in the same plot twice. > Unless there's a compelling reason, I don't think that will change. > > On Monday, November 14, 2016, Scott T <sgseab...@gmail.com <javascript:>> > wrote: > >> Oh my mistake, I see you have supplied plot_5 twice. If I do that, I get >> the problem you describe. >> >> I'm not quite sure why you'd want to repeat a plot, but it looks like >> this is causing problems. If you really want to include plot_5 twice, I >> suggest making a new plot_6 with the same parameters and including that >> instead. >> >> I'll open a bug report at Plots for this behaviour. >> >> Scott >> >> On Monday, 14 November 2016 11:59:45 UTC, Scott T wrote: >>> >>> The layout has space for 6 plots but the final plot command only >>> supplies 5. When I run your example (on the development branch of Plots) I >>> get an error because of that. Have you tried the dev branch? >>> `Pkg.checkout("Plots, "dev")`, restart julia and re-run it. >>> >>> Scott >>> >>> On Monday, 14 November 2016 11:29:09 UTC, Ferran Mazzanti wrote: >>>> >>>> It is a minor variation of the example given by Scott >>>> for some data set y, cosy, y2, sqrty, siny, logy (doesn't matter the >>>> values, could be random) >>>> >>>> plot_1 = plot([y cosy], >>>> title = "Data y", >>>> xlims = (0,10), >>>> ylims = (-0.1,1.1), >>>> grid = true, >>>> xlabel = "Iteration", >>>> ylabel = "y & cos(y)" >>>> ); >>>> >>>> plot_2 = plot(y2, >>>> title = "Data y Squared", >>>> xlims = (0,10), >>>> ylims = (-0.1,0.5), >>>> grid = false, >>>> xlabel = "Iteration", >>>> ylabel = "y^2", >>>> legend = false, >>>> ); >>>> >>>> plot_3 = plot( [sqrty siny], >>>> title = "Square Root of y", >>>> xlims = (0,10), >>>> ylims = (-0.1,0.5), >>>> grid = false, >>>> xlabel = "Iteration", >>>> ylabel = "y^2" >>>> ); >>>> >>>> plot_4 = plot(logy, >>>> title = "Log of y", >>>> xlims = (0,10), >>>> ylims = (-10,0), >>>> grid = false, >>>> xlabel = "Iteration", >>>> ylabel = "y^2" >>>> ); >>>> >>>> plot_5 = plot(expy, >>>> title = "Exp of y", >>>> xlims = (0,10), >>>> ylims = (1,2), >>>> grid = false, >>>> xlabel = "Iteration", >>>> ylabel = "y^2" >>>> ); >>>> >>>> lay = @layout [a grid(2,2); b] >>>> plot( plot_1, plot_2, plot_3, plot_4, plot_5, plot_5, layout = lay ) >>>> >>>>