Currently function plots are limited to using plot styles requiring only a single value per sampled point. Unlike data plots, you cannot specify additional columns of data in a `using` specifier.
This patch creates a pseudo-filename '+' that allows function plots to use the `using` mechanism to handle additional values at each sample point. This allows the full range of plot styles (filledcurves, labels, errorbars, vectors, ...) to be used with analytic functions.
f(x) = sin(x)
g(x) = sin(x)**2
plot '+' using 1:(f($1)):(g($1)) with filledcurves
help datafile special-filenames
new demo "approximations.dem" (output attached)
The implementation is straightforward for normal 2D plots, slightly non-obvious for normal 3D plots (but no worse than writing to a file and reading the file back in, as in the vectors demo). However, I am a relative novice at using parametric functions, so these are essentially untested.