# R example of what I would like to do.
x = 1:3
pdf(file = "plotR.pdf")
plot(x = x, y = x + 3)
plot(x = x, y = 2 * x + 1)
dev.off()
# My first Julia attempt.
using Gadfly
x = [1,2,3]
plot1 = plot(x = x, y = x + 3)
plot2 = plot(x = x, y = 2 * x + 1)
draw(PDF("plotJ.pdf", 6inch, 3inch), plot1)draw(PDF("plotJ.pdf", 6inch, 3inch), plot2)
Pb: plot2 overrides plot1, so only plot2 in plotJ.pdf.
To be clear, in this example, I want plot1 & plot2 in two distinct plots/pages -- as opposed to merge both graphs into one plot.
Thanks.