Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Drawing a Line From One Plot to Another

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127721] Re: Drawing a Line From One Plot to Another
  • From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
  • Date: Fri, 17 Aug 2012 03:41:43 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@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

Hi, Gregory,

Here is a minimalistic approach. Try it:

pl1 = Plot[x^2, {x, -3, 3}];
pl2 = Plot[2 x, {x, -3, 3}];

Show[{GraphicsColumn[{pl1, pl2}],
  Graphics[{Red, Thick,
    Line[{Scaled[{0.6, 0.12}], Scaled[{0.6, 0.64}]}]}]}]

Have fun, Alexei


Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG

Office phone :  +352-2454-2566
Office fax:       +352-2454-3566
mobile phone:  +49 151 52 40 66 44

e-mail: alexei.boulbitch at iee.lu






  • Prev by Date: Re: Simplify
  • Next by Date: Re: working with nested lists
  • Previous by thread: Re: Drawing a Line From One Plot to Another
  • Next by thread: Drawing a Line From One Plot to Another