Plot a straight line, parallell to the y-axis in gnuplot?

  • Thread starter Dr-NiKoN
  • Start date
  • #1
94
0

Main Question or Discussion Point

How do you plot a straight line, parallell to the y-axis in gnuplot?
Something like:
x = 20
?
 

Answers and Replies

  • #2
graphic7
Gold Member
450
2
Last edited:
  • #3
94
0
plot 20, gives y = 20, a line parallell with the x-axis.

I want x = 20
 
  • #4
graphic7
Gold Member
450
2
Try this:

'set parametric'
'plot 20,t'
 
  • #5
94
0
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.
 
  • #6
graphic7
Gold Member
450
2
'plot [t=-1000:1000] 20,t'

Just change the t-range to whatever fits for you.
 
  • #7
94
0
Ah, perfect.

Thanks a lot :)
 
  • #8
NateTG
Science Advisor
Homework Helper
2,450
5
Looks like you've gotten the other problem of the linear programming thing figured out. ;)
 
  • #9
94
0
hehe, yup :)
 
  • #10
18
0
can I get Gnuplot for windows?
 
  • #11
graphic7
Gold Member
450
2
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.
 
Last edited by a moderator:

Related Threads for: Plot a straight line, parallell to the y-axis in gnuplot?

  • Last Post
Replies
2
Views
2K
Replies
11
Views
5K
  • Last Post
Replies
3
Views
4K
Replies
8
Views
13K
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
5
Views
14K
  • Last Post
Replies
1
Views
3K
Replies
3
Views
7K
Top