[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange behavior when printing plots in eps
From: |
Ben Abbott |
Subject: |
Re: Strange behavior when printing plots in eps |
Date: |
Mon, 02 Apr 2012 07:50:32 -0400 |
On Apr 2, 2012, at 5:02 AM, Moreno Marzolla wrote:
> Hello everybody,
>
> I am experiencing a different behavior of Octave 3.2.3 and 3.6.1 when saving
> plots as a b/w eps file. Before submitting a bug report I would like to check
> if this is intended.
>
> Consider the following code:
>
> x = 1:10;
> plot(x,3*sqrt(x),";First;",x,2*sqrt(x),";Second;",x,sqrt(x),";Third;");
> print("test.eps","-deps2","-mono","-debug");
>
> Using Octave 3.2.3 as shipped with ubuntu 10.04, I get that the three curves
> have different linestyle (solid, dashed, dotted). Using octave 3.6.1 (which I
> compiled myself, again under ubuntu 10.04), I get all solid lines both with
> the gnuplot and with the fltk backend. At the moment I cannot check if this
> happens with a recent tip also.
>
> Looking at octave-print-commands.log which is produced by the "-debug" option
> above, I see that Octave 3.2.3 inserts this:
>
> ...
> set style line 1 default;
> set style line 1 linewidth 0.500000 pointsize 1.000000;
> set style line 2 default;
> set style line 2 linewidth 0.500000 pointsize 1.000000;
> set style line 3 default;
> set style line 3 linewidth 0.500000 pointsize 1.000000;
> ...
>
> while Octave 3.6.1 inserts this:
>
> ...
> set style line 1 default;
> set style line 1 linetype 1 linewidth 0.500000;
> set style line 2 default;
> set style line 2 pointsize 2.000000;
> set style line 2 default;
> set style line 2 linetype 1 linewidth 0.500000;
> set style line 3 default;
> set style line 3 pointsize 2.000000;
> set style line 3 default;
> set style line 3 linetype 1 linewidth 0.500000;
> set style line 4 default;
> set style line 4 pointsize 2.000000;
> ...
>
> The problem seems caused by the fact that all styles are defined with
> "linetype 1" (there are also redundant "set style line X default").
> I can get the old behavior by manually setting the line styles as follows:
>
> x = 1:10;
> plot(x,3*sqrt(x),"-;First;",x,2*sqrt(x),"--;Second;",x,sqrt(x),":;Third;");
> print("test.eps","-deps2","-mono","-debug");
>
> Is this behavior intended?
>
> Thanks,
>
> Moreno.
Looks like a bug. Please file a report.
https://savannah.gnu.org/bugs/?group=octave
Ben