I'm not sure I understand the question. If you don't want continual
autoscaling of a graph, just specify specific limits of the x and y axes
before starting the plotting, by specifying these limits in creating a
gdisplay object.
As to the autoscaling done in the graph machinery, rescaling isn't done
for every plot. Rather, if the new values require rescaling, the
rescaling is done about 1% larger than needed, so that there is a good
chance that another rescale won't be required for a while.
Bruce Sherwood
Hans-Joachim Gurt wrote:
> Hi,
>
> I noticed that the scene is updated & resized after every calculation.
>
> The effect can be seen with just a small change (added print-statement)
> to one of the example programs, e.g.:
>
>
> from visual.graph import *
>
> funct1 = gdots(color=color.red)
> funct2 = gvbars(delta=0.05, color=color.blue)
>
> for x in arange(0.0, 10.10, 0.1):
> y1 = 5.0 * cos(2.0*x) * exp(-0.2*x)
> y2 = 4.0 * cos(0.5*x) * exp(-0.1*x)
> print x, y1, y2 # causes short delay
> funct1.plot(pos=( x,y1 ))
> funct2.plot(pos=( x,y2 ))
>
>
> The scene is 'blown up' as new values are added.
>
> It would be nice if there were commands to stop/restart updating
> and forcing a refresh of the scene.
>
> A similar request was on the mailinglist back in 2006-09
> "freezing the scene", but I found no followup to that posting.
>
>
> By(t)e,
> HaJo Gurt
|