|
From: sfeam (E. Merritt) <sf...@us...> - 2013-02-08 02:56:10
|
On Thursday, 07 February 2013, Dmitri A. Sergatskov wrote:
> plot sin(x)
> do for [w = 2:4] {replot sin(w*x)}
>
> Produces two curves (sin(x) and sin(4*x) ) and four labels.
> Is it intended behavior?
Intended? probably not. But why would you issue such a command?
Expected? Yes.
Each replot command repeats the previous plot and adds
a new sin(w*x) to it, so there is one additional curve
each time through.
"help replot"
Arguments specified after a `replot` command will be added onto the last
`plot` or `splot` command (with an implied ',' separator) before it is
repeated. `replot` accepts the same arguments as the `plot` and `splot`
commands except that ranges cannot be specified.
|