« Return to Thread: plot range

Re: dashed line

by Thomas Sefzick :: Rate this Message:

Reply to Author | View in Thread

> Is it possible to plot a straight line like x=3,  1<y<2, without using "set arrow"?

yes, in parametric plotting mode, see 'help parametric'

but then all of your functions need to be specified as a
pair of x(t),y(t)-functions, e.g.:

instead of:

set xrange [-pi:pi]
plot sin(x)

it would be:

set parametric
set trange [0:1]
f(x)=x*2.*pi-pi ; # just for convenience
plot f(t),sin(f(t))

plus a vertical line (x=2, -0.7<=y<=0.5):

plot f(t),sin(f(t)), 2.,t*1.2-0.7

 « Return to Thread: plot range