On Thursday 13 October 2005 09:08 am, Lars Hecking wrote:
>
> I've been playing around with linestyles to see whether I could get any
> resemblance of dashed lines with X/png/gif, which is apparently not
> possible, and came across this issue.
It is possible in X, but only if you set the appropriate Xresources
as described in the documentation. The default state is the equivalent
to "set term post solid". If the Xresources provide dash patterns,
then you get the equivalent of "set term post dashed".
Try:
echo "gnuplot*line2Dashes: 42" | xrdb -merge
echo "gnuplot*line3Dashes: 88" | xrdb -merge
echo "gnuplot*line5Dashes: 63" | xrdb -merge
gnuplot -persist dashcolor.dem
> But "with <style>" does not accept a "linestyle" or "ls" option,
Works fine for me.
gnuplot> set style line 1 lt 4 lc rgb "pink"
gnuplot> plot sin(x) with lines ls 1
Or am I misunderstanding your point?
> I think I've seen quite a few scripts using
> "plot foo with lines N".
That was acceptable syntax in earlier versions, and is still
accepted for backward compatibility with old scripts.
However, in the presence of some new (4.1 only) features,
this syntax is ambiguous and can cause parsing errors.
The ambiguity is not a problem for old scripts because they
obviously do not contain the new options. And the explicit
use of the "lt" or "linetype" keyword is accepted by all
versions of gnuplot.
So the form "with lines N" is deprecated for new scripts,
but is still accepted for backward compatibility with old scripts.
I suppose the documentation could state that.
--
Ethan A Merritt merritt@...
Biomolecular Structure Center
Mailstop 357742
University of Washington, Seattle, WA 98195
|