[Tioga-users] multiple figures in one class: only the first works

Sergey Astanin astanin at calvino.polito.it
Tue Dec 12 08:43:54 EST 2006


> $ ruby test.rb
>
> Make Blue.pdf
> DEBUG: plot_blue
> cd figures_out; pdflatex -interaction nonstopmode Blue.tex > pdflatex.log
>
> Make Red.pdf
> DEBUG: plot_blue
> cd figures_out; pdflatex -interaction nonstopmode Blue.tex > pdflatex.log
>
> What am I doing wrong? How I should define/use multiple figures? I am
> using tioga 1.2.1 in Linux.

I have found a solution, instead of make_preview_pdf(name)

        def run
                t.figure_names.each do |name|
                puts "\nMake #{name}.pdf"
                t.make_preview_pdf(name)
                end
        end

make_preview_pdf(number) should be used:

        def run
                0.upto(t.num_figures-1) do |i|
                        t.make_preview_pdf(i)
                end
        end

It seems that make_preview_pdf(name) is working like make_preview_pdf(0)
and gives no warnings. I guess samples/ subdirectory of tioga
(figures/sample_batch.rb, plots/run.rb, sine.rb) should be updated
according to this bahaviour. Tutorial should be updated too [1].

1.
http://theory.kitp.ucsb.edu/~paxton/tioga_doc/classes/Tioga/Tutorial/DocStructure.html

Best regards,
Sergey Astanin


More information about the Tioga-users mailing list