help-octave
[Top][All Lists]
Advanced

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

Re: Draw a line through 2 points


From: Przemek Klosowski
Subject: Re: Draw a line through 2 points
Date: Mon, 17 May 2004 11:51:01 -0400 (EDT)

   >>How do I draw a line through 2 points.  Not just between the points but 
going
   >>off the graph on either side?
   >
   I'm not sure this sounds like something gnuplot would have built in as a 
   capability. It sounds like you want an extrapolation of data beyond the 
   range you are plotting. I would say you should compute some extra points 

Gnuplot on its own can plot 'functions', i.e. it doesn't need you to
precompute data tables, you can just say 'plot sin(x)'. Use 'gplot' in
octave to access it:

       hold on
       plot(x,y,"x")
       gplot("3*x+4")

Note that Octave's X is an array; while the 'x' in gplot is passed on to 
gnuplot, where it's the default independent variable. 

The code above doesn't quite work---there's something in gnuplot-octave
interface that limits the range of the gplot function to the range of
the array. It's not xrange---I am sure others more familiar with the
way plot() is set up will suggest something

    p



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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