|
From: Mike B. <mi...@mb...> - 2006-06-07 19:20:11
|
Hi,
I have encountered some unexpected behaviour in gnuplot while trying to
produce a surface plot using 'splot' and a particular grayscale palette.
The plot that I'm trying to generate involves the aspect (or azimuth)
angles of land surface slopes in a digital terrain model. These angles
run from 0 degrees (north), through 180 degrees (south), to 360 degrees
(north again). Therefore, the palette that I want to use ideally needs
to run from black (0 degrees) to white (180 degrees) to black again (360
degrees). The problem that I have with the grayscale palette is best
illustrated by the following commands, which gives the output exactly as
required in an X11 terminal...
set term x11
set palette gray rgbformulae -13,-13,-13
test palette
(a screenshot of the resulting output is attached; test_palette.png).
However, when I try to produce the same thing using either the epslatex
terminal (my preferred format) or the postscript terminal, i.e.
set term epslatex "default" 10
set palette gray rgbformulae -13,-13,-13
set output "test.eps"
test palette
set output
the output grayscale seems to revert to simple black (0 degrees) through
to white (360 degrees).
Hmm! So, am I doing something wrong? do the rgbformulae in fact vary
from one terminal type to another? is this a limitation of postscript
graphics? or is it a bug in gnuplot?
Even more curiously, when I tried to output the same figure directly as
a PNG image (as opposed to via a screen grab) using the following commands
set term png
set palette gray rgbformulae -13,-13,-13
set output "test.png"
test palette
set output
I don't get the grayscale wedge at the bottom of the image at all.
For the record, this is the output of 'show version' on my system.
G N U P L O T
Version 4.0 patchlevel 0
last modified Thu Apr 15 14:44:22 CEST 2004
System: Linux 2.6.13-15.10-default
Any advice gratefully received.
Mike Barnsley
|