1.

How To Plot Two Functions In Non-overlapping Regions?

Answer»
  • Parametric plot can be used to plot 2 functions in non-overlapping regions.
  • Following examples illustrates:
    gnuplot> set parametric
    gnuplot> aaf=1
    gnuplot> bb=3
    gnuplot> CC=2
    gnuplot> dd=4
    gnuplot> x1(t) = aa+(bb-aa)*t
    gnuplot> X2(t) = cc+(dd-cc)*t
    gnuplot> f1(x) = SIN(x)
    gnuplot> f2(x) = x**2/8
    gnuplot> plot [t=0:1] x1(t),f1(x1(t)) title "f1", x2(t), f2(x2(t)) title "f2"
  • The LAST line of code is parametric plot that plots the functions x1 and f1, x2 and f2.



Discussion

No Comment Found