Menu

how to plot a function like x=y**2-3

Help
Jose Luis
2017-10-03
2017-10-03
  • Jose Luis

    Jose Luis - 2017-10-03

    Hello to the group,

    I've been looking for an answer that tell how to plot fuctions like x=y²-3 directly, that is, making the y the independent variable, but I haven't found anything.

    I don't know if it is possible or not, or if I need to plot this kind of fuctions calculating the points.

    Thanks in advance, and sorry if this question has been answered before, I haven't found the answer.

    Regards

     
    • Hans-Bernhard Broeker

      The key is that that is not a function to begin with, in the usual sense. It's an implicit relation between x and y. In this particular case, where one side is 'x', the easiest approach is parametric mode:

      set parametric
      plot t**2 - 3, t 
      
       
  • Ethan Merritt

    Ethan Merritt - 2017-10-03

    You just want the plot?
    Well, if x=y**2-3 then y = ±sqrt(x+3)

    To plot both branches:
    set xrange [-3:*]
    plot sqrt(x+3) lt 1, -sqrt(x+3) lt 1

     
  • Jose Luis

    Jose Luis - 2017-10-06

    Hi,

    Thanx for both answers, but parametric plot seems to be the correct aproximation to my needs.

    Thank you very much for your interest.

    Regrads

    Jose Luis

     

Log in to post a comment.