Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #11375

Re: Drawing a Line From One Plot to Another

From "Alexander Elkins" <alexander_elkins@hotmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Drawing a Line From One Plot to Another
Date 2012-08-16 06:06 +0000
Message-ID <k0i2lm$1cf$1@smc.vnet.net> (permalink)
References <k0d4b9$m8b$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


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
>


Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Drawing a Line From One Plot to Another Gregory Lypny <gregory.lypny@videotron.ca> - 2012-08-14 09:04 +0000
  Re: Drawing a Line From One Plot to Another Vincenzo Carrino <vincent.carrino@gmail.com> - 2012-08-15 07:33 +0000
  Re: Drawing a Line From One Plot to Another "Alexander Elkins" <alexander_elkins@hotmail.com> - 2012-08-16 06:06 +0000
  Re: Drawing a Line From One Plot to Another E. Martín-Serrano <eMartinSerrano@telefonica.net> - 2012-08-20 08:16 +0000
  Re: Drawing a Line From One Plot to Another "Alexander Elkins" <alexander_elkins@hotmail.com> - 2012-08-29 05:19 +0000

csiph-web