3
$\begingroup$

I would like to draw the blue guide lines as shown spanning between the top and bottom graphs. Any help is appreciated. Thanks!

$\endgroup$
  • $\begingroup$ Please add any germane code to generate the graphs and clarify precisely how these "guide lines" are defined. $\endgroup$ – ciao Jun 1 '14 at 22:27
  • $\begingroup$ Kuba answered. (Graph is generated in xmgrace and not mathematica.) $\endgroup$ – Ari Jun 1 '14 at 22:55
5
$\begingroup$

The key is PlotRangeClipping-> False:

With[{stdopt = 
   Sequence[Frame -> True, Axes -> False, ImageSize -> 300, PlotRangeClipping -> False,
            PlotStyle -> {Red, Thick}]},
 Column[{
   Plot[x, {x, 0, Pi/2}, Epilog -> {Thick, Blue, Line[{{.5, .5}, {.5, -1}}]}, stdopt],
   Plot[Sin[x], {x, 0, Pi/2}, stdopt, Epilog -> {Thick, Blue, Line[{{0, Sin@.5}, 
                                                 {.5, Sin@.5}, {.5, 5}}]}]
   }, Spacings -> 0]]

enter image description here

$\endgroup$
  • $\begingroup$ You may be also interested in PlotRangePadding->0. $\endgroup$ – Kuba Jun 1 '14 at 21:52
  • $\begingroup$ It's the Epilog which did the trick. Very nice! $\endgroup$ – Ari Jun 1 '14 at 22:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.