(OT?) epslatex and colors

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

(OT?) epslatex and colors

Claudio Belotti
Hi all,
when I plot using terminal "epslatex color" the eps file has color mixed
cyan for blue, blue for green ... and I can't get any green line!

I know this probably is OT but maybe some of you know how to solve this ...

thanks
Claudio



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------


Reply | Threaded
Open this post in threaded view
|

Re: (OT?) epslatex and colors

Dmitri A. Sergatskov
Claudio Belotti wrote:
> Hi all,
> when I plot using terminal "epslatex color" the eps file has color mixed
> cyan for blue, blue for green ... and I can't get any green line!

I assume what you mean is that the colors on your screen plot
differ from colors in your epslatex output file.
This is a known problem/limitation of gnuplot. Plot will
look differently on different terminals. If you really particular
about the colors in your plot, you need to run "test" command
in gnuplot for all the terminal types you want, figure out
the color index and then, in octave, use plot command
in the form similar to:

plot(x,y,"-N;;")

where N is the index of the desired color.
For example, (in gnuplot 4.1) for fig terminal:

gnuplot> set term fig big color
Terminal type set to 'fig'
Options are 'color big pointsmax 1000 landscape inches dashed textnormal fontsize 10 linewidth 1 depth 10 version 3.2'
gnuplot> set out "fig-test.fig"
gnuplot> test
fig: Palette used before set
gnuplot> quit

Looking at the output file "fig-test.fig" (in xfig) I can see
that 1 is black, 2 is blue, 3 is green, 4 is cyan, 5 is red, and
6 is magenta.

That is different from colors on x11 terminal:
1 - red, 2 - green, 3 - blue, 4 - magenta, 5 - cyan, 6 - brown.

> thanks
> Claudio
>

Hope it helps.

Dmitri.
--



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------


Reply | Threaded
Open this post in threaded view
|

Re: (OT?) epslatex and colors

Claudio Belotti
Dmitri A. Sergatskov wrote:

> For example, (in gnuplot 4.1) for fig terminal:
>
> gnuplot> set term fig big color
> Terminal type set to 'fig'
> Options are 'color big pointsmax 1000 landscape inches dashed textnormal
> fontsize 10 linewidth 1 depth 10 version 3.2'
> gnuplot> set out "fig-test.fig"
> gnuplot> test
> fig: Palette used before set
> gnuplot> quit
> Looking at the output file "fig-test.fig" (in xfig) I can see
> that 1 is black, 2 is blue, 3 is green, 4 is cyan, 5 is red, and
> 6 is magenta.
> That is different from colors on x11 terminal:
> 1 - red, 2 - green, 3 - blue, 4 - magenta, 5 - cyan, 6 - brown.
> Hope it helps.

thanks Dmitri, I plotted a test and now I understand better.
Really, it seems that I can't have a green line in epslatex ... but it's
not really important.

thank you
Claudio





-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------


Reply | Threaded
Open this post in threaded view
|

Re: (OT?) epslatex and colors

Jonathan Stickel
Claudio Belotti wrote:

> Dmitri A. Sergatskov wrote:
>
>> For example, (in gnuplot 4.1) for fig terminal:
>>
>> gnuplot> set term fig big color
>> Terminal type set to 'fig'
>> Options are 'color big pointsmax 1000 landscape inches dashed
>> textnormal fontsize 10 linewidth 1 depth 10 version 3.2'
>> gnuplot> set out "fig-test.fig"
>> gnuplot> test
>> fig: Palette used before set
>> gnuplot> quit
>> Looking at the output file "fig-test.fig" (in xfig) I can see
>> that 1 is black, 2 is blue, 3 is green, 4 is cyan, 5 is red, and
>> 6 is magenta.
>> That is different from colors on x11 terminal:
>> 1 - red, 2 - green, 3 - blue, 4 - magenta, 5 - cyan, 6 - brown.
>> Hope it helps.
>
>
> thanks Dmitri, I plotted a test and now I understand better.
> Really, it seems that I can't have a green line in epslatex ... but it's
> not really important.
>
>

You could use the fig terminal, and subsequently produce (e)ps/latex
from that.  If you don't want to open up xfig, you can even convert fig
files at the terminal using "fig2dev".  I also suggest checking out
"fig2ps" (http://fig2ps.sourceforge.net/).

Jonathan



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------


Reply | Threaded
Open this post in threaded view
|

Re: (OT?) epslatex and colors

Joan Picanyol i Puig
In reply to this post by Claudio Belotti
* Claudio Belotti <[hidden email]> [20050408 16:58]:

> Dmitri A. Sergatskov wrote:
> >For example, (in gnuplot 4.1) for fig terminal:
> >
> >gnuplot> set term fig big color
> >Terminal type set to 'fig'
> >Options are 'color big pointsmax 1000 landscape inches dashed textnormal
> >fontsize 10 linewidth 1 depth 10 version 3.2'
> >gnuplot> set out "fig-test.fig"
> >gnuplot> test
> >fig: Palette used before set
> >gnuplot> quit
> >Looking at the output file "fig-test.fig" (in xfig) I can see
> >that 1 is black, 2 is blue, 3 is green, 4 is cyan, 5 is red, and
> >6 is magenta.
> >That is different from colors on x11 terminal:
> >1 - red, 2 - green, 3 - blue, 4 - magenta, 5 - cyan, 6 - brown.
> >Hope it helps.
>
> thanks Dmitri, I plotted a test and now I understand better.
> Really, it seems that I can't have a green line in epslatex ... but it's
> not really important.

If you really want, you can sed the *.eps files afterward (I've done it
in the past). Something like

sed -i 's,/Blue {1 1 0 0, /Green {1 0 1 0, ; s, Blue, Green,' *eps

should work.

qvb
--
pica



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------