ruby - How to create a multi-page PDF-file with Gnuplot? -


i make dozen of plots gnuplot on mac via ruby-gnuplot. if re-run ruby script, number of open windows plots doubles. if output these plots in pdf opened in preview, file automatically updated after every re-run , don't need bother closing numerous windows.

currently can achieve 1 plot per pdf-file:

gnuplot.open |gp|   gnuplot::plot.new(gp) |plot|     plot.arbitrary_lines << "set terminal pdf \n set output 'figures.pdf'"     # ...   end end 

how can make single pdf figures gnuplot?

hmm, @ least on gnuplot un*x, multipage output postscript , pdf default - long don't either change terminal type nor reassign output file, plot ends on new page.

i.e. do:

set terminal pdf set output "multipageplot.pdf" plot x, x*x plot sin(x), cos(x) set output "" 

and end 2 pages in pdf file, 1 containing line/parabola, other sine/cosine.

to clarify: important thing issue plot commands in sequence, without changing output file nor changing terminal type. gnuplot won't append existing pdf file.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -