how can I plot two functions with different xranges (overlapping) on the
same graph? Gnuplot doesn't appreciate a square bracket after the comma
following the first function in the plot command.
I don't want a second x-axis.
Thanks for your advice,
Daniel Winkelmann
> how can I plot two functions with different xranges (overlapping) on the
> same graph? Gnuplot doesn't appreciate a square bracket after the comma
> following the first function in the plot command.
You either have to use parametric mode and map x ranges to the common
t range manually:
x1(t) = 5+(10-5)*t
x2(t) = 8+(16-8)*t
set parametric
set trange [0:1]
plot x1(t), sin(x1(t)) title 'part of a sine', \
x2(t), cos(x2(t)) title 'part of a cosine'
Or you use the '?' operator to define plottable function that are
undefined where you don't want them plotted:
set noparametric
set xrange [0:25]
plot (x<5 || x>10) ? 0/0 : sin(x) title 'part of a sine', \
(x<8 || x > 16) ? 0/0 : cos(x) t 'part of a cosine'
--
Hans-Bernhard Broeker (bro...@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Daniel Winkelmann