functions over different xrange

Help
Ben
2007-05-05
2013-02-10
  • Ben
    Ben
    2007-05-05

    I was wondering whether it was possible to plot a number of different functions, each over a different domain, on the same plot. The reason this is important is that one of the functions that I want to plot has a small domain and I want to suppress it so that it doesn't extend over the entire plot domain, where it overlaps with other functions/data points, making them unreadable.
    Any help would be much appreciated, thanks alot

     
    • Yes, that's possible.  It's one of many things you can use parametric mode for.  In a nutshell:

      set parametric
      set trange [0:1]

      x1(t)=12+(34-12)*t
      x2(t)=20+(25-20)*t

      plot x1(t),sin(x1(t)) title 'sin(x)', \      x2(t),x2(t)/20   title 'x/20'

       
    • Ben
      Ben
      2007-05-05

      Ah, great! Thanks very much, I'll get plotting right away :)