MathGroup Archive 2007

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

Search the Archive

Re: : 6.0 Get Graphics Coordinates...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78119] Re: : 6.0 Get Graphics Coordinates...
  • From: s-sanam at talk21.com
  • Date: Sat, 23 Jun 2007 07:11:16 -0400 (EDT)
  • References: <f4on38$7sg$1@smc.vnet.net><200706140911.FAA05973@smc.vnet.net>

On Jun 21, 11:40 am, "Ingolf Dahl" <ingolf.d... at telia.com> wrote:
> Of course there was some bug in my GetGraphicsCoordinates palette yesterday.
> The relation between the Mathematica ClipboardNotebook[] (not present in the
> Mathematica 6 Documentation Center!) and the Windows system clipboard is a
> bit complicated, and they sometimes can get out of sync. It seems to me as
> if pasting between cells uses the Mathematic Clipboard, while pasting into
> the inside of Input cells uses the Windows clipboard. If the clipboards are
> out-of-sync, then the result of pasting depends on where you paste. I have
> corrected the code to improve the behavior. I have also seen some occasional
> errors and instability in the Mathematica 6 behavior, but someone else has
> the responsibility for such problems.
> You have to move the palette to be able to save it.
> There seems to be some problems also with the palette in the KDE windowing
> system. In the new version of the palette, the "Copy locator positions" also
> sets the $LocatorPositions variable to the list of locator positions. Then
> hopefully that property can be used, even if the copying mechanism does not
> work.
> As Robert Novak pointed out yesterday, there are some 5.2 graphics left in
> the documentation, and there the old GetGraphicsCoordinates mechanism still
> works. It also seem to work with bitmap images. But the coordinates you
> obtain are not necessarily connected to the coordinate system inside the
> graph.
>
> A benefit of this palette is that you might operate on already generated
> graphics. You do not have to regenerate them. That is a benefit of the
> Mathematica 6 system also: the generated graphics are stored without the
> memory losses associated to the PostScript conversion.
>
> Here is the new code:
>
> CreatePalette[
>   Column[{Button["Add LocatorPane",
>      SelectionMove[InputNotebook[], All, CellContents];
>      NotebookWrite[
>       InputNotebook[], (DynamicModuleBox[{$CellContext`pts$$ = {{0.,
>               0.}}}, LocatorPaneBox[Dynamic[$CellContext`pts$$], #,
>            LocatorAutoCreate -> True], DynamicModuleValues :> {}]) &@
>        NotebookRead[InputNotebook[]]]],
>     "Use Alt+Click to add or delete locators!",
>     Button["Copy locator positions",
>      SelectionMove[InputNotebook[], All, Cell];
>      FrontEndExecute[FrontEndToken["Copy"]];
>      SelectionMove[InputNotebook[], All, CellContents];
>      Module[{b}, b = NotebookRead[InputNotebook[]];
>       If[And[Length[b] >= 3, MatchQ[b[[2]], _LocatorPaneBox]],
>        b = b[[1, 1]]; $LocatorPositions = b;
>        SelectionMove[ClipboardNotebook[], All, Notebook];
>        NotebookWrite[ClipboardNotebook[], ToBoxes[b], All];
>        SelectionMove[ClipboardNotebook[], All, Notebook]]]],
>     Button["Remove LocatorPane",
>      SelectionMove[InputNotebook[], All, CellContents];
>      Module[{b}, b = NotebookRead[InputNotebook[]];
>       If[And[Length[b] >= 3, MatchQ[b[[2]], _LocatorPaneBox]],
>        NotebookWrite[InputNotebook[], b[[2, 2]]]]]],
>     Dynamic[MousePosition["Graphics"]]}],
>   WindowTitle -> "Get Graphics Coordinates"];
>
> Suggestions are welcome
> Best regards
>
> Ingolf Dahl
>
>
>
> > -----Original Message-----
> > From: Ingolf Dahl [mailto:ingolf.d... at telia.com]
> > Sent: den 20 juni 2007 12:20
> > To: mathgr... at smc.vnet.net
> > Subject:  Re: 6.0 Get
> > Graphics Coordinates...
>
> > Here is my suggestion:
> > I have created a Matematica-6 palette with three buttons,
> > intended to mimic the GetGraphicsCoordinates from Mathematica 5.
>
> > Use:
> > 1. Select a graphics cell and press the "Add LocatorPane" button.
> > 2. Press "Alt" and click the mouse to add or delete point
> > ("locators") to the graphics.
> > 3. Press the "Copy locator position" to copy a list of the
> > locator coordinates to the Clipboard.
> > 4. Select a graphics cell and phe "Remove LocatorPane" to
> > reset the graphics to initial conditions (if you want to do that)
>
> > You get the flexibility that it is possible to adjust the
> > position of the locators. It seems necessary to start with
> > one point present. I have chosen to put this point at {0,0}.
>
> > Best regards
>
> > Ingolf Dahl- Hide quoted text -
>
> - Show quoted text -

Hi... Could you tell me how i could get coordinates for a 3d list plot
in mathematica 5.2. the 2d option is insufficient.



  • Prev by Date: Re: Re: PrimePi and limit of argument
  • Next by Date: Re: Re: PrimePi and limit of argument
  • Previous by thread: RE: Re: 6.0 Get Graphics Coordinates...
  • Next by thread: Re: 6.0 Get Graphics Coordinates...