Message Boards Message Boards

1
|
5416 Views
|
6 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Picking off the coordinates from a point in Graphics?

Posted 8 years ago

Why is it that when I try to copy off the coordinates from a point in Graphics it gives me the result as Strings instead of numbers?

I use the following procedure:

1) With the pointer in an existing 2D Graphics I use right-click and Get Coordinates. This gives me the crosshairs.

2) I move the pointer to the point from which I want the coordinates and click once, which makes a point on the graphic.

3) I use Ctrl+C to copy the coordinates, which I usually want to paste into a Text statement.

And when pasted the result is this:

{{"-7.212","1.673"}}

which is not very useful without further processing, such as:

ToExpression /@ First[{{"-7.212", "1.673"}}]

Am I missing something here? And also, if one only clicks a single point why isn't GetCoordinates smart enough to return the result in only a single set of braces? That is what one would usually want to paste into commands.

6 Replies

That promises to be useful. But something I always forget how to do:

Once I evaluate the CreatePalette command, how do I save the palette (so I don't have to recreate it each time I need it)? If I use the menu item Palettes > Install Palette, in the resulting pop-up window there seems to be no option for the Source field to select that currently-open palette.

POSTED BY: Murray Eisenberg
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract

Be respectful. Review our Community Guidelines to understand your role and responsibilities. Community Terms of Use