plot issues

Ben Abbott bpabbott at mac.com
Fri Jun 5 11:07:42 CDT 2009


On Jun 5, 2009, at 11:55 AM, Ethan Merritt wrote:

>
>>> Does Octave have a confguration file or configuration menu that the
>>> user can find easily?  I suggest to make the production of pdf
>>> output a
>>> user-configurable choice.
>>> PDF output via (select one)
>>>  -->  pdf (let gnuplot choose for you)
>>>  -->  pdfcairo
>>>  -->  tikz / pdflatex
>>>  -->  PostScript / ps2pdf
>>
>>
>> Such a configuration capability is not present in Octave's sources.
>>
>> However, how do we let gnuplot choose for us (I like this approach) ?
>
> That's what "set term pdf" does.  It chooses either the PDFLib or  
> cairo
> based pdf terminal depending one which is installed.  If both are  
> installed
> it currently defaults to using PDFLib, but it might make sense to  
> change
> that.
>
> There is an unfortunate disconnect between the people who create/name
> new terminal drivers and the people who use them.  The developer is
> understandably focused on the mechanism being used to create the file.
> The user only cares about the output.  We're still at the tail end of
> a long back-and-forth about whether the new "driver that creates a pdf
> file by using gnuplot to create a lua script, lua to create a tikz
> script, and pdflatex to create a pdf file" should be called a
> lua terminal, a tikz terminal, or (new to the mix) a pdf terminal.
> There are legitimate points to be made for all three choices:
>
> - "lua" because hypothetically you could use the same terminal and  
> same
> output file with other lua scripts to create some other output.
> - "tikz" because that is the TeX flavor being created by the existing
> script (parallel to the naming of the metapost and pstricks terminals)
> - "pdf" because at the end of the day that's probably what you will  
> end
> up with.
>
> Context is important also, and it is hard for the program, either  
> Octave
> or gnuplot, to know the user's ultimate intent.  If you want a pdf  
> plot
> for inclusion in a LaTeX document, then lua/tikz/pdflatex is the way  
> to
> go.  But if you have no LaTeX installed, which is common, then this is
> probably the worst choice.
>
> Ugh.
>
> That's why I advocate for providing the user with a configuration  
> option.
> You still have to pick a default, but you do so knowing that it may be
> the wrong default for many users.

I do plan to add the tikz terminal to octave as soon as it is patched  
to handle fonts better and I'm able to build again (presently my build  
fails due to an out-dated patch for Fink on Mac OSX).

Regarding the various pdf terminals, it would be a simple matter to  
allow the user to choose what terminal he wishes, via ...

	print -dpdf file.dpf

or

	print -dpdfcairo file.pdf

However, Petr's suggestion is attractive. That being ...

- if "pdfcairo" is present => use "set term pdfcairo ..."
- if "pdf" is present => use "set term pdf ..."
- if neither => use "set term postscript ..." and then convert using  
ghostscript

Ben






More information about the Bug-octave mailing list