Unfortunatly gnuplot does not offer this kind of feature for functions and only for data sets. There are two ways to do this now, one of which I would recommend:
f(x)=2**x
g(x)=1024
xmax=10
set xrange [0:xmax]
plot '+' using 1:(f($1)):(g($1)) with filledcurves closed
6
votes
The answer by @toxicate20 demonstrates nice usage for the pseudofile +. For this particular case, that's not actually necessary since one of your functions is simply a constant:
set xrange [0:10]
plot 2**x w filledcurves y1=1024
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more