help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave w/ gnuplot backend produces bad pdf


From: sfeam
Subject: Re: octave w/ gnuplot backend produces bad pdf
Date: Tue, 31 May 2016 15:11:44 -0700
User-agent: KMail/4.14.5 (Linux/4.1.15-desktop-2.mga5; KDE/4.14.5; x86_64; ; )

On Tuesday, 31 May 2016 03:03:51 PM Dmitri A. Sergatskov wrote:
> The following octave scrip produces a bad pdf
> (similar to one in  https://bugzilla.redhat.com/show_bug.cgi?id=1340660 )
> 
> graphics_toolkit ("gnuplot")
> x=linspace(-1,1,11);
> y=0;
> z=x;
> mesh(x,y,z);
> colormap([0,0,0]);
> print("bad_pdf.pdf", "-dpdfcairo")
> 
> ====
> 
> A gnuplot script tat demonstrates the problem is attached (it contains
> binary data).
> 
> Both firefox and chrome would render pdf anyway, but evince/xpdf/okular
> would not.
> 
> I suspect the problem with octave's
> colormap([0,0,0])
> command here.
> But I also think that gnuplot should not produce bad pdf.

I have not yet looked in detail, but my first thought is that the gnuplot 
command
        set palette ... maxcolors 1
is a nonsense command.   A palette with only one color is no palette at all.

I could understand a general case script that sometimes reduced to a
degenerate palette for which the endpoint colors were the same. 
This would correspond to gnuplot commands
      set palette defined (0 "black", 1 "black")
But in this case I expect the "maxcolors" parameter would still be 
0 (continuous interpolation) or 256 or whatever. 

        Ethan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]