Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Dynamic window popup question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110361] Re: Dynamic window popup question
  • From: Arturas Acus <Arturas.Acus at tfai.vu.lt>
  • Date: Tue, 15 Jun 2010 02:29:41 -0400 (EDT)

Thank You for this nice solution.

By the way, I managed to achieve similar rezult putting
myMakeGraphics[] inside Block[]. Calling ListPointPlot3D inside Block[] 
and using the same PopupWindow construction, myMakeGraphics is 
supressed, so graphic are not actually generated. Then click on the 
point generates it in PopupWindow.



On Mon, 14 Jun 2010, John Fultz wrote:

> Here's the beginnings of some code which does what you're looking for.  The
> critical insights are to use Button[] instead of PopupWindow[] (Button holds its
> second argument), and to use DynamicModule[] to make guarantee that the function
> you use in Button[] is properly initialized.
>
> ListPointPlot3D[
> Tooltip[Table[{RandomReal[], RandomReal[], RandomReal[]}, {50}]],
> PlotStyle -> {PointSize[.02]}]
>
> DynamicModule[{myMakeGraphics},
> % /. Tooltip[arg_, ___] :> Button[arg, myMakeGraphics[arg]],
> Initialization :> {myMakeGraphics[Point[{a_, b_, c_}]] :=
>    CreateDocument[Plot[a Sin[b x^c], {x, 0, 2 \[Pi]}],
>     WindowSize -> Fit, WindowElements -> {}]}]
>
> Sincerely,
>
> John Fultz
> jfultz at wolfram.com
> User Interface Group
> Wolfram Research, Inc.
>
>
> On Sun, 13 Jun 2010 18:53:10 -0400 (EDT), Arturas Acus wrote:
>>
>> Dear group,
>>
>> I have phase space points ListPointPlot3D[data].
>> Clicking on point I want the solution, which represents that point to
>> appear.
>>
>> I can achieve this simply by replacing each point by
>> PopupWindow[point, myMakeGraphics[point]]
>> construction, where myMakeGraphics generates this graphics.
>> Thought this approach works, it tries to generate all required graphics
>> immediatelly, and then hides them into ListPointPlot3D output.
>>
>> This take much time and memory. How can I force the graphics to be
>> generated only after pushing Shift+Enter in the appeared popup window?
>>
>> I want the popup window with myMakeGraphics[point] appear, then pressing
>> shift+enter the graphics to be generated in the same popup notebook.
>>
>> So far I was able to generate graphics this way only in Messages notebook
>> :).
>>
>> Sincerely, Arturas Acus
>
>
>
>


  • Prev by Date: Re: Dynamic window popup question
  • Next by Date: Re: Apply a function to parts of a list
  • Previous by thread: Re: Dynamic window popup question
  • Next by thread: Washington DC Area Mathematica Special Interest Group