Menu

how to draw vertical lines for asymptotes

Help
2002-09-18
2002-09-19
  • Gunther Schadow

    Gunther Schadow - 2002-09-18

    Hi, I thought there was a way of drawing vertical lines into a 2d function plot. The syntax I thought
    was used was:

    plot 1/(x-5)+10, x=5, 10

    the purpose is to show the vertical asymptote (x=5) as well as the horizontal asymptote (y=10). Another issue that comes to mind in this example, how can I specify that a certain range of x should be skipped and sample points not connected, such that we do not plot for x=5. I would think of a syntax such as

    plot [x=-5:5\0] 1/(x-5)+10,x=5,5

    is this supported in any other way? Thoughts about adding this feature?

     
    • Gunther Schadow

      Gunther Schadow - 2002-09-18

      uhh, made a mistake. Last example should have been

      plot [x=-5:15] 1/(x-5)+10, x=5, 10

      sorry for causing confusion.

       
    • Hans-Bernhard Broeker

      The answer to these queries is "parametric mode".  Using that,
      you can:

          x(t)=-5+20*t
          set parametric
          set trange [0:1]
          set xrange[x(0):x(t)]
          plot x(t), 1/(x(t)-5)+10, \           5, -100+200*t,  \                      x(t), 10

      To skip x ranges, modify the x(t) mapping.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.