Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Drawing a Line From One Plot to Another
Replies: 5   Last Post: Aug 29, 2012 1:19 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alexander Elkins

Posts: 32
Registered: 4/13/09
Re: Drawing a Line From One Plot to Another
Posted: Aug 16, 2012 2:06 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

It is possible to do this using the Drawing Tools from the Graphics menu on
the output of GraphicsGrid.

Or use Get Coordinates from the context menu on the output of GraphicsGrid
and then go back and add an Epilog option to GraphicsGrid.
For example, based on Bob Hanlan's example:

y1[x_] = x^2;
y2[x_] = 2 x;
pts = {x, y1[x]} /. Solve[y1[x] == y2[x], x];
GraphicsGrid[{{Plot[Evaluate[Tooltip[y1[x]]], {x, -1, 3},
Frame -> True, Axes -> False,
Epilog -> {Text[#, #, {1, -2}] & /@ pts, Red,
AbsolutePointSize[4], Point[pts]}]}, {Plot[
Evaluate[Tooltip[y2[x]]], {x, -1, 3}, Frame -> True,
Axes -> False,
Epilog -> {Text[#, #, {-1, 2}] & /@ pts, Red,
AbsolutePointSize[4], Point[pts]}]}},
Epilog -> {Darker[Green], AbsoluteDashing[{10, 5}],
Arrow[{{113.5, -208.4}, {117.8, -397.4}}],
Arrow[{{272.1, -122.6}, {275.4, -299.6}}]}]

Hope this helps...

"Gregory Lypny" <gregory.lypny@videotron.ca> wrote in message
news:k0d4b9$m8b$1@smc.vnet.net...
> Hello everyone,
>
> Say I have two plots, y=x^2 and y=2x, aligned vertically using

GraphicsColumn. Their domains are aligned because x runs from -3 to +3 in
both. I'd like to be able to draw a line from a point in the top graph to a
point in the bottom graph. How can I do that?
>
> Regards,
>
> Gregory
>







Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.