MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Flashing Graphs With Manipulate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88696] Re: [mg88672] Flashing Graphs With Manipulate
  • From: Christopher Carlson <carlson at wolfram.com>
  • Date: Tue, 13 May 2008 07:08:29 -0400 (EDT)
  • References: <200805120846.EAA21345@smc.vnet.net>

On May 12, 2008, at 3:46 AM, bobbaillie at frii.com wrote:

> If the coefficient of x is < 0 and the constant term is > 0,
> this graph flashes as you drag the sliders.
>
> Why?  NSolve can't be taking that much longer in this case.
>
> What can be done to prevent the flashing?
>
> Manipulate[
> With[ { func = b x + c },
>  Module[ { rts },
>   rts = NSolve[func == 0, x];
>   ListPlot[
>   {Re[x], Im[x]} /. rts,
>   PlotStyle -> PointSize[0.03],
>   PlotRange -> {{-10, 10}, {-10, 10}}, ImageSize -> {300, 300},
>   AspectRatio -> 1, PlotLabel -> func]
>  ]
> ],
>  { {b, -1, "coefficient of x"}, -9, 9, .1, Appearance -> "Labeled"},
>  { {c, 3, "constant term"}, -10, 10, .1, Appearance -> "Labeled"}
> ]

This is a bug that was largely fixed in version 6.0.2: in some  
instances, objects inside a Manipulate would flash when sliders were  
dragged.

A workaround here is to replace

	PlotLabel -> func

with

	PlotLabel -> ToString[func]


Christopher Carlson
User Interface Group
Wolfram Research, Inc



  • Prev by Date: Re: Flashing Graphs With Manipulate
  • Next by Date: Re: Display commands in a package
  • Previous by thread: Flashing Graphs With Manipulate
  • Next by thread: Re: Flashing Graphs With Manipulate