MathGroup Archive 2008

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

Search the Archive

Re: Aligning two PLots

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94487] Re: [mg94413] Aligning two PLots
  • From: Carl Woll <carlw at wolfram.com>
  • Date: Sun, 14 Dec 2008 07:41:24 -0500 (EST)
  • References: <200812121155.GAA27978@smc.vnet.net>

Nikolaus Rath wrote:

>Hello,
>
>I would like to align two plots horizontally, i.e. the tics on the x
>axis should be exactly aligned. Example:
>
>Plot[Sin[x], {x, 0, 3 \[Pi]}]
>Plot[5000 Sin[x], {x, 0, 3 \[Pi]}]
>
>in the output, the x axis of the second plot is more to the right than
>the x-axis of the first plot (due to the wider labels on the y-axis).
>
>Is there a way to align these two plots exactly?
>  
>
Give both plots the same left/right ImagePadding, e.g.:

p1 = Plot[Sin[x], {x, 0, 3 \[Pi]}, ImagePadding -> {{25, 10}, 
{Automatic, Automatic}}];
p2 = Plot[5000 Sin[x], {x, 0, 3 \[Pi]}, ImagePadding -> {{25, 10}, 
{Automatic, Automatic}}];
GraphicsColumn[{p1, p2}]

Carl Woll
Wolfram Research

>Note that I do not want to have the two functions overlapping in one
>plot, the two graphs should be well separated vertically.
>
>
>Thanks,
>
>
>   -Nikolaus
>
>--
> =C2=BBIt is not worth an intelligent man's time to be in the majority.
>  By definition, there are already enough people to do that.=C2=AB
>                                                         -J.H. Hardy
>
>  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C
>  
>



  • Prev by Date: Re: Mathematica 7 is now available
  • Next by Date: Re: use of a notebook inside another notebook
  • Previous by thread: Re: Aligning two PLots
  • Next by thread: Re: Aligning two PLots