MathGroup Archive 2007

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

Search the Archive

Re: Slow Manipulate with image argument

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79205] Re: Slow Manipulate with image argument
  • From: Jon McLoone <jonm at wolfram.co.uk>
  • Date: Sat, 21 Jul 2007 04:22:04 -0400 (EDT)
  • References: <f7pqi0$1a8$1@smc.vnet.net>

On Jul 20, 9:08 am, "Maarten van der Burgt"
<maarten.vanderbu... at icos.be> wrote:
> Dear all,
>
> Consider the lines of code below:
>
> dat =Table[Sin[x y/2],{x,-10,10,0.04},{y,-10,10,0.04}];
>
> gr=ArrayPlot[dat];
>
> h=Length[dat];
> w =Length[dat[[1]]];
>
> Manipulate[
> GraphicsColumn[{Show[{gr,Graphics[{Green,Line
> [{{0,h-i},{w,h-i}}]}]}],ListPlot[dat[[i]],PlotJoined->True,PlotRange->
> {-1,1}]}],
> {{i,200},1,h,1}]
>
> In the code above I generate a quite large array with data (= dat; in my
> real application dat is an image of similar size which I want to analyze).
>
> I generate an ArrayPlot (gr) of the data.
>
> Using Manipulate I want to show the data in each line of the array using
> ListPlot.
>
> It would help the analysis if in the same Manipulate window I could show
> the image with a line drawn on top of it, indicating which line of the
> array is shown in the ListPlot.
>
> This all works, but, since the graphics needs to be updated every time,
> Manipulate becomes very slow.
>
> Has anyone a bright idea how to speed this up, or to write this slightly
> different with the same (but faster) result?
>
> Thanks for your help,
>
> Maarten

Changing GraphicsColumn to Column seems to help a lot.




  • Prev by Date: Re: graphing frequency & amplitude?
  • Next by Date: Re: Plot without Show
  • Previous by thread: Re: Slow Manipulate with image argument
  • Next by thread: Re: Slow Manipulate with image argument