View Full Version : gnuplot
Dr-NiKoN
Nov4-04, 05:11 PM
How do you plot a straight line, parallell to the y-axis in gnuplot?
Something like:
x = 20
?
graphic7
Nov4-04, 05:13 PM
'plot 20'
For more information, try 'help plot'.
Ah, I apologize - misunderstood the question.
After some googling I found this:
http://www.gnuplot.info/faq/faq.html#SECTION000616000000000000000
Dr-NiKoN
Nov4-04, 05:21 PM
plot 20, gives y = 20, a line parallell with the x-axis.
I want x = 20
graphic7
Nov4-04, 05:36 PM
Try this:
'set parametric'
'plot 20,t'
Dr-NiKoN
Nov4-04, 05:40 PM
Hm, that gives me a short line, it stops at around y = 5. I need it all the way up since I'm plotting linear unequalities.
graphic7
Nov4-04, 05:44 PM
'plot [t=-1000:1000] 20,t'
Just change the t-range to whatever fits for you.
Dr-NiKoN
Nov4-04, 05:53 PM
Ah, perfect.
Thanks a lot :)
Looks like you've gotten the other problem of the linear programming thing figured out. ;)
Dr-NiKoN
Nov5-04, 02:06 PM
hehe, yup :)
can I get Gnuplot for windows?
graphic7
Nov7-04, 01:15 PM
Yes, you can, but there's a catch. Gnuplot is primarily for Unix systems, however, an environment does exist for Win32 called Cygwin that will enable you to build Unix applications, such as Gnuplot.
You can get Cygwin (be sure to read the documentation) from:
http://www.cygwin.com
Once you have Cygwin installed, grab the Unix sources from:
http://www.gnuplot.info
Gnuplot's primary graphics environment is X11 - you'll have to install XFree86 in the Cygwin distribution. If you feel this is too complex for your tastes, Gnuplot can generate PDF and Postscript plots.
Edit: I found this nice link on Gnuplot SF site:
http://sourceforge.net/project/showfiles.php?group_id=2055&package_id=1996
There are some Win32 packages, but you might have to have the Cygwin .dll or some more dependencies that are present in the Cygwin distribution. This will save you from building Gnuplot, regardless.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.