Message Boards Message Boards

0
|
5810 Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Is it possible to get distance between two points on a graph?

Posted 10 years ago

Something similar like getting coordinates? Is that possible?

Or, what would be the simplest way? Note that I can only read data from a graph.

POSTED BY: Mitja Jan?i?
5 Replies
POSTED BY: David Reiss
POSTED BY: Mitja Jan?i?

Just take the resulting points and past them into EuclideanDistance... but remove the outer brackets or use Apply as in

EuclideanDistance @@ {{1.384, 1.878}, {1.896, 2.33}}

one also could certainly create a tool to do this using things like this (it gives the distance between the last two points created--create new points by alt-clicking on windows or command-clicking on OSX):

Manipulate[
 Column[{
   Plot[x^2, {x, -1, 4}],
   If[Length[u] > 1, EuclideanDistance @@ Take[u, -2], 0]}
  ], Button["reset", u = {}],
 {{u, {}}, Locator, LocatorAutoCreate -> True}]
POSTED BY: David Reiss

Jup, that's a good answer how to get coordinates.

But my question is, if there is a similar tool to get distance between two arbitrary points (which i would select exactly as shown on the video you gave) in a plot?

POSTED BY: Mitja Jan?i?
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