Re: Zoom2D
- To: mathgroup at smc.vnet.net
- Subject: [mg82699] Re: Zoom2D
- From: dh <dh at metrohm.ch>
- Date: Mon, 29 Oct 2007 05:31:19 -0500 (EST)
- References: <200710251008.GAA21713@smc.vnet.net> <ffsdd9$om6$1@smc.vnet.net>
Hello Murray, I posted it to this newsgroup, you may find it in the archive. To save you the trouble, here it is again in *.m format: =========================================== Zoom2D[g0_]:=Module[{g,g1,pp1,pp2},tt=g0; If[!MatchQ[Head[g0],Graphics|GraphicsBox],CreateDialog[{TextCell["Zoom: No Input available."],DefaultButton[]}];Return[]; ]; g=If[Head[g0]=!=Graphics,ReplaceAll[g0,{GraphicsBox->Graphics,LineBox->Line,FormBox[x1_,x2___]:>StringReplace[x1,"\""->""]}],g0]; g=g/.NCache[_,x_]:>x; {pp1,pp2}=(PlotRange/.AbsoluteOptions[g])//Transpose; g1=DynamicModule[{p1=pp1,p2=pp2,lp={0,0},aspect=1},Column[{LocatorPane[Dynamic[{p1,p2}],Show[{g,Graphics[{Opacity[0.1],Rectangle[Dynamic[p1],Dynamic[p2]]}]},ImageSize->Small]],EventHandler[Show[g,PlotRange:>Dynamic[Transpose[{p1,p2}]],Frame->True,ImageSize->Full,AspectRatio->Dynamic[aspect]],{"MouseClicked":>(lp=MousePosition["Graphics"])}],Dynamic[lp] ,Row[{TextCell["AspectRatio fixed: "],Checkbox[Dynamic[aspect],{Automatic,1}]}]},Center]]; CreateDocument[g1,WindowSize->{Small,All},WindowTitle->"Zoom-DH",WindowElements->{},WindowFrame->"Palette",BoxForm`ClosingSaveDialog->False];] CreatePalette[Button["Zoom",Zoom2D[NotebookRead[SelectedNotebook[]]]],WindowTitle->""]; ===================================================== Daniel Murray Eisenberg wrote: > Where is Zoom2D available? > > dh wrote: >> Hello, >> >> 4 weeks ago I posted the newest version of Zoom2D adapted to Mahematica >> >> 6.0.1. Since I received 2 complaints that the new version is not working >> >> because the command "BoxForm`ClosingSaveDialog -> False]" is marked red >> >> by Mathematica's editor. >> >> Well, I just made several plots (e.g. Plot[Sin[x],{x,0,10}]) and tried >> >> Zoom2D, this worked without problems. Looking at the code, it is true >> >> that the above command is flagged red, but this seems rather a bug of >> >> the editor than of Zoom2D. >> >> If somebody had a problem with Zoom2D, I beg that he sends me an example >> >> that I have a chance to look at it. >> >> Daniel >> >> >> >
- Follow-Ups:
- Re: Re: Zoom2D - V6 question
- From: Syd Geraghty <sydgeraghty@mac.com>
- Re: Re: Zoom2D - V6 question
- References:
- Zoom2D
- From: dh <dh@metrohm.ch>
- Zoom2D