[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to produce B&W (not mono, not colour) surf/mesh EPS plot
From: |
Benjamin Lindner |
Subject: |
Re: How to produce B&W (not mono, not colour) surf/mesh EPS plot |
Date: |
Wed, 16 May 2007 07:45:58 +0200 |
>
> Hi,
>
> I've been struggling with this one for a while. I can't believe I'm the
> only
> one with this problem, but I've googled and searched the mailing-list
> archives and found nothing that works; most online stuff seems to apply to
> antediluvian versions of Octave.
>
> My problem is that I need to produce a B&W (or greyscale using only dark
> greys) surface plot for printing. surf() or mesh() produce colour plots
> with
> yellow and cyan which are nearly invisible on paper or on the screen. I've
> been able to get greyscale output, but again with very light greys which
> are
> invisible. I've tried :
>
> __gnuplot_raw__("set palette maxcolors 1;\n");
>
> This produces the output I want on-screen, but the EPS file (print
> 'foo.eps') has no plot at all (as if the only colour used was white). I've
> hacked 'mesh.m' to redefine the palette (to all 'grey20'), then if I print
> with 'print foo.eps -color' and I can get what I want, but this is surely
> evil, there has to be a canonical way of doing this that I've overlooked,
> no?
>
> Also, there is a "key" in the top-right corner that I can't seem to find a
> way to suppress. I can change/cull the text, "line 1", in the EPS with
> sed,
> but my PostScript-Fu is not good enough to get rid of the little key line.
>
> Using Octave 2.9.9 with all the packaged trimmings on Ubuntu Feisty.
>
> Any ideas?
The following produces a black-only surface plot for me on octave-2.9.9
sombrero(10);
__gnuplot_raw__("set palette defined ( 0 \"black\", 1 \"black\" );\n");
replot;
print -color -depsc2 test.eps
you can choose to have not black-only by defining a gradient from
black to e.g. gray50 or anything desired.
__gnuplot_raw__("set palette defined ( 0 \"black\", 1 \"white\" );\n");
would yield a full grayscale palette.
I also do not see a key in this case, neither on screen, nor in the eps
I guess that
__gnuplot_raw__("set key off;\n");
should do the job in any case.
However, using manually defined palettes and gnuplot-specific tweaks
would probably be best done by saving data to a file and plotting
directly with gnuplot.
benjamin
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer