plot(_1,sin(_1)+_1); // plots the function sin(x) + x plot(_1,_2,exp(-_1*_1 - _2*_2)).ds(cboxes()) // plots a gauss, 2 dim (see the examples !!)

- Graphs are automatically deleted!!!
- How to plot functions?
- Plotting functions with condition
- Specifying parameter range(s), scanning
- Accessing the most recently plotted function

In the following paragraphs many `plot` commands will be
described, which plot data from arrays, files, output of commands,
etc. All of these have the common property, that they set the
`autodel` flag of the
resulting graph to `true`. Therefore, whenever the frame containing this graph is cleared, this
graph will be deleted, any pointer to this will be invalid!

The resulting values will be stored in the graph (the first function's values in the first column, etc). From this point on everything is the same as for data-plotting: the drawing style of the graph will decide, how to interpret the data in the columns.

This means, that whenever you want to plot a 'simple function',
like sin(x), you should not say `plot(sin(x))`!

- First of all because
`x`has no meaning here, not like in gnuplot, where it refers to the independent variable. - The 'more correct'
`plot(sin(_1))`is also not correct, because it would produce a single-column graph, which can not be drawn

To plot a parameterized half-circle, for example, write this:

`plot(cos(_1),sin(_1)).p1range(0,3.1415);`

The number of parameters to be swept (1 or 2) is deduced from the to-be-plotted functions: if any of them uses 2 arguments, 2 parameters will be scanned, otherwise only 1.

To plot functions in a domain, where any combination of the parameters satisfy some condition, use the following two functions:plot_if(const function &condition, const function &f1, const function &f2=unset, const function &f3=unset, const function &f4=unset);(or the similar

function x = _1; function y = _2; function gaus = exp(-x*x-y*y); plot_if(x*x+y*y<1, x, y, gaus).ds(cboxes()).p1range(-1,1).p2range(-1,1);This piece of code plots a 2D gaussian within the unit circle. If you would want to make a cut in the z-value (i.e. the gaussian), use that:

plot_if(gaus<0.5,x,y,gaus)...The object returned from a

plot(_1, sin(_1)).p1range(0,20); plot(_1, _2, exp(-_1*_1 - _2*_2)).p1range(-5,5).p2range(-5,5).ds(cboxes()); // 2 params, a 2D Gauss

By default, the parameters `p1` (and `p2`, if needed)
are scanned in a linear way to sample the function values. The
`p1log(bool)` (`p2log(bool)`) member functions can set a
flag to make the scan logarithmic, i.e. the corresponding parameter
will be incremented by the same *factor* in each step.

The `get::lastf()` function returns a pointer to the
most recently plotted fgraph of the current frame (or 0, if no
functions were plotted yet). This can be used to modify it, for
example (interactively checking how a function behaves

plot(_1,1/(_1-PAR(0))); get::lastf()->param(0,1);

Source files: plot.h plot.cc