Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3645
| From | "F. Russell" <fr@random.info> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: Is Subsecond Pause Possible? |
| Date | 2017-05-14 18:47 +0000 |
| Organization | NewsGuy - Unlimited Usenet $23.95 |
| Message-ID | <ofa8ok01s78@news3.newsguy.com> (permalink) |
| References | <of9rk60164o@news4.newsguy.com> <ofa5e8$4q5$1@dont-email.me> |
On Sun, 14 May 2017 10:54:21 -0700, Ethan A Merritt wrote:
>
> I am pretty sure you want "plot ..." rather than "replot...",
> or else you want "replot;" with no trailing functions.
>
> As it stands your "replot" instruction creates a longer plot sequence
> each time it executes, so by the end of your loop it is drawing
> 400 plots on top of each other per iteration. I can see how
> that might slow it down.
>
Thank you for that explanation. It does solve the problem.
I need to set up a different graph before the animation
and so I can't use "plot" command in the animation because it will
destroy the original graph. I need to use the "replot" command.
But now I can just plot the original graph and then plot the initial
point of the animation using "replot f(t), g(t)". Then I run the
rest of the animation only "replot;".
set parametric
# plot the first graph
set trange [0:2*pi]; plot cos(t), sin(t) with lines lw 8
#plot the initial point of the animation with "replot f(t), g(t)"
a_time=0
replot f(a_time), g(a_time) with points pt 7 ps 2 lc 2
# perform the animation with just "replot;"
do for [i=1:400] { \
a_time=a_time+0.01;
replot; \
pause 0.3 }
Now the pauses are less than 1 second and the animation runs
smoothly.
Thanks again.
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Find similar
Is Subsecond Pause Possible? "F. Russell" <fr@random.info> - 2017-05-14 15:03 +0000
Re: Is Subsecond Pause Possible? Karl Ratzsch <mail.kfr@gmx.net> - 2017-05-14 19:07 +0200
Re: Is Subsecond Pause Possible? Ethan A Merritt <EAMerritt@gmail.com> - 2017-05-14 10:54 -0700
Re: Is Subsecond Pause Possible? "F. Russell" <fr@random.info> - 2017-05-14 18:47 +0000
csiph-web