|
From: | Jonathan Stickel |
Subject: | Re: How do you plot dashed lines? |
Date: | Fri, 19 Mar 2004 13:52:29 -0800 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040214 |
Dmitri A. Sergatskov wrote:
Vic Norton wrote:How do you plot dashed lines in octave? I'm using gnuplot. The MatLab formatoctave> plot(F(1, :), F(2, :), "--") just produces a solid red line. octave> plot(F(1, :), F(2, :), "b--") changes the line to blue, but it is still solid. So how do you get dashes?The short answer -- you cannot. The long answer is -- it depends on the terminalthat gnuplot is using. You can issue "test " command to gnuplot to see allcapabilities of the terminal you are using. I can tell you that e.g. X11 terminaldoes not have dashed lines and postscript does have. You would have to investigate the others. Also if you are to use postscript terminal you would have to use low-level plotting using "gset" etc... One option would be using "fig" terminal and then edit the final picture in xfig.
gnuplot can be a very complex but useful program. If you plot a number of lines in octave, by default they will show as different colored solid lines in X11. But if you then "print" the graph to a file like this (needs octave-forge and mark_as_command("print")):
octave> print -deps "output.eps"You will get a black and white eps graphic with the lines differentiated by dash patterns. Although I thought this strange at first, I decided I liked this behavior. X11 is for visualizing the data, and color works great for that. But a print graphic is often best in black and white, as long as the dash patterns are appropriate.
To customize color and dash patterns, you will need to use the low-level gnuplot commands as described in the gnuplot manual (http://www.bmsc.washington.edu/people/merritt/gnuplot/gnuplot.pdf).
Jonathan ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |