plot issues

Ben Abbott bpabbott at mac.com
Fri Jun 5 03:38:15 CDT 2009


On Jun 5, 2009, at 4:15 AM, Petr Mikulik wrote:

>>>>> printing to pdfcairo
>>>>>
>>>>> plot(1:100)
>>>>> print -dpdf z.pdf
>>>>> print -dpdfcairo zz.pdf
>>>>>
>>>>> ... the output file is called pdfcairo:zz.pdf
>>>>
>>>> This behavior is intended.
>>>
>>> This will certainly *not* work under windows, since the colon is  
>>> not a valid
>>> filename character. It actually designates the streams associated  
>>> with a
>>> file. So it might not issue an error (haven't checked) but then  
>>> very subtly
>>> misbehave.
>>>
>>> This should be fixed.
>>>
>>> benjamin
>>
>>
>> Recently this behavior was removed. Octave had been using  
>> "convert" (from
>> imagemagick) to produce alternative formats. This is now done using
>> ghostscript. Specifically, when a terminal is specified that is not
>> supported/recognized, it is assumed that ghostcript is to be used  
>> to convert
>> to the specified format. As the cairo terminals are not explicitly  
>> supported,
>> specifying -pdfcairo produces a ghostscript error when using the  
>> developers
>> sources.
>>
>> The pdfcairo and pngcairo terminals could be supported, but are not  
>> supported
>> at this time.
>>
>> Petr, what are the benefits of the pdfcairo and pngcairo terminals  
>> over the
>> pdf and png terminals?
>
> Usually the (original) pdf terminal is not compiled in because of  
> license
> issues. pdfcairo and pngcairo are automatically compiled in if the  
> system
> has cairo library (available as a package for most linux  
> distributions, for
> example).
>
> I think that the cairo terminals handle UTF-8 text correctly.
>
> I gave cc: to gnuplot list so that somebody can explain the  
> difference in
> more details.

Are there any license problems with the plain png terminal, or is it  
just the pdf?

Presently, when the pdf terminal is specified, the print() function  
checks with gnuplot to determine if the "pdf" terminal is supported.  
If not, or unknown, print() checks for the presence of ghostscript. If  
present, the ps terminal is used to produce a ps-file and then  
ghostscript is used to convert to pdf.

Ben



More information about the Bug-octave mailing list