|
From: Dmitri A. S. <das...@gm...> - 2013-02-08 03:08:27
|
On Thu, Feb 7, 2013 at 8:55 PM, sfeam (Ethan Merritt) <
sf...@us...> wrote:
> 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.
>
So I would expect the result to be the same as in
gnuplot> plot sin(x)
gnuplot> replot sin(2*x)
gnuplot> replot sin(3*x)
gnuplot> replot sin(4*x)
Dmitri.
|