octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnuplot and dashed lines


From: CdeMills
Subject: gnuplot and dashed lines
Date: Thu, 20 Dec 2012 07:46:41 -0800 (PST)

Hello,

I was struggling to obtain dashed lines without success. At first I believe
it was MacOs specific; now I've found the problem.

If you take the content of
http://gnuplot.sourceforge.net/demo/dashcolor.html
and paste it into gnuplot interface, you get the same figure as given on the
web page. If you download the script provided at
http://gnuplot.sourceforge.net/demo/dashcolor.1.gnu which is supposed to
give exactly the same result, you don't. 

There is a subtle difference: the script does not include the 'set
termoption dashed' command at the beginning. This makes a lot of
differences: by default, it seems that gnuplot renders all lines as solid.

To verify, it tried this simple script:
 x = 1:10;
 h=plot (x,x,'-;line 1;',x,x+1,'--;line 2;')

I got a figure with two continuous lines. Then I did
drawnow("aqua", "/dev/null", false, "debug.gp")
edited the debug.gp file, added a "set term option dashed" at the beginning,
then, in a terminal:
gnuplot < debug.gp

and got the dashed lines ! The missing point is thus to add this
"termoption" at the beginning of the gnuplot script. Another option is to
create a "~/.gnuplot" with this line:
set termoption dashed

Restarted Octave, ran the same script, and got a dashed line directly!
Dash-dot working too.

This should be either corrected into the gnuplot interface, either
documented. Moreover, gnuplot seems to not have a way to query the
termoption settings. I don't see how to interactively test wether or not
this feature is supported.

Regards

Pascal

 




--
View this message in context: 
http://octave.1599824.n4.nabble.com/gnuplot-and-dashed-lines-tp4648154.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]