|
From: Lars H. <lhe...@us...> - 2005-10-13 16:08:46
|
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.
gnuplot> help style
Functions and data may be displayed in one of a large number of styles.
The `with` keyword provides the means of selection.
Syntax:
with <style> { {linestyle | ls <line_style>}
| {{linetype | lt <line_type>}
{linewidth | lw <line_width>}
{linecolor | lc <colorspec>}
{pointtype | pt <point_type>}
{pointsize | ps <point_size>}
{fill | fs <fillstyle>}
{palette}}
}
But "with <style>" does not accept a "linestyle" or "ls" option,
so this should be rewritten as
Syntax:
with <style> { <line_style>
| ...
If you agree, I'll commit the change to cvs. Or should the could change
to match the docs? I think I've seen quite a few scripts using
"plot foo with lines N".
|
|
From: Hans-Bernhard B. <br...@ph...> - 2005-10-13 16:17:20
|
Lars Hecking wrote: > But "with <style>" does not accept a "linestyle" or "ls" option, If so, that's quite clearly a bug. > If you agree, I'll commit the change to cvs. Or should the could change > to match the docs? The latter. > I think I've seen quite a few scripts using > "plot foo with lines N". Of course --- but those should all be legacy scripts, from the time before 'linetype' was an named argument, and that 'N' does *not* mean 'ls <N>' but 'lt <N>'. |
|
From: Lars H. <lhe...@us...> - 2005-10-13 16:26:29
|
Hans-Bernhard Broeker writes:
> Lars Hecking wrote:
> > But "with <style>" does not accept a "linestyle" or "ls" option,
>
> If so, that's quite clearly a bug.
>
> > If you agree, I'll commit the change to cvs. Or should the could change
Sorry, I meant: should the code change, i.e. should the linestyle/ls option
be created?
> > to match the docs?
>
> The latter.
>
> > I think I've seen quite a few scripts using
> > "plot foo with lines N".
>
> Of course --- but those should all be legacy scripts, from the time
> before 'linetype' was an named argument, and that 'N' does *not* mean
> 'ls <N>' but 'lt <N>'.
Confusing. So the documentation should be changed
Syntax:
with <style> { <line_type>
| {{linetype | lt <line_type>}
....
?
|
|
From: Hans-Bernhard B. <br...@ph...> - 2005-10-13 16:36:04
|
Lars Hecking wrote: > Hans-Bernhard Broeker writes: > > Sorry, I meant: should the code change, i.e. should the linestyle/ls option > be created? No. It already exists (or at least, it did, for quite a while). If it's gone, thats a bug which needs fixing. > Confusing. So the documentation should be changed No. The code has to be. |
|
From: Ethan M. <merritt@u.washington.edu> - 2005-10-13 16:33:38
|
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@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |
|
From: Lars H. <lhe...@us...> - 2005-10-13 16:38:22
|
> 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? Ahh. I wasn't aware that I need to set a line style first. That is not very clear from the docs. |