Re: PopupWindow vs EventHandler
- To: mathgroup at smc.vnet.net
- Subject: [mg117510] Re: PopupWindow vs EventHandler
- From: Armand Tamzarian <mike.honeychurch at gmail.com>
- Date: Mon, 21 Mar 2011 06:15:25 -0500 (EST)
- References: <im4ir9$d1s$1@smc.vnet.net>
On Mar 20, 8:53 pm, Thomas M=FCnch <thomas.mue... at gmail.com> wrote: > Dear Group, > > Below is a simplified version to illustrate my problem. The code below > will create a simple graph with a red and blue point. When you click on > the points, a popup-window will open to present a plot of the "data". > The red dot does this with an EventHandler[], and the blue dot with a > PopupWindow[]. > > data = Table[Sin[x], {x, 0, 10}]; > event[point_] := > EventHandler[Tooltip[Point[point], "EventHandler"], > "MouseClicked" :> > CreateDocument[ListPlot[data], WindowSize -> All]]; > pop[point_] := > PopupWindow[Tooltip[Point[point], "Popup"], ListPlot[data], > WindowSize -> All]; > Graphics[{PointSize[Large], Red, event[{0, 1}], Blue, pop[{1, 1}]}, > AspectRatio -> Full, ImageSize -> {50, 20}] > > There is the following problem: The plot in the PopupWindow can be > selected, but cannot copied-and-pasted somewhere else. This is something > that I would like to be able to do. > With the Plot in the other window (EventHandler), this is possible. > However, if you now Quit[] the kernel (i.e. Mathematica forgets about > the definition of data), the EventHandler does not produce the plot > anymore, while the PopupWindow still works. > > I'd like to be able to do one of the following: > - copy-and-paste plots out of the PopupWindow, > or: > - have the EventHandler remember the data in a fresh Mathematica session. > > Some background: I analyze data, where the points represent some > condensed properties of data. Clicking the points should show the > original data, with the possibility to extract the original-data plot > (copy-and-paste) for further inspection. > > Thank you! > thomas On my system -- 8.0.1 OS X 10.6.6 -- both copy and paste ok. Mike