user2138149
user2138149

Reputation: 16841

gnuplot - "How to draw an asymptote" / "Get axis value range", get x or y axis minimum and maximum values

Is it possible to "get" the x/y (or other) axis plot range values?

The reason I am trying to do this is that I want to plot a vertical line on my graph at the position of an asymptotic point... Perhaps there is an alternative or better way of doing this than drawing an arrow (with no head) on the graph?

Upvotes: 2

Views: 1268

Answers (1)

user2138149
user2138149

Reputation: 16841

Thanks to @Christoph (again) I have been able to do the following:

#Plot asymptote
set arrow from b,graph 0 to b,graph 1 lt 2 lw 2 lc rgb "green" nohead

This code does the following:

  • draws an arrow
  • start position: x=variable b, y=graph 0 (minimum of graph [y] axis)
  • end position: x=variable b, y=graph 1 (maximum of graph [y] axis)
  • line type 2 (may require set termoption dashed to enable dashed lines, consult documentation)
  • line width 2
  • line color green
  • no arrow head (a line)

Upvotes: 2

Related Questions