Re: Aligning two PLots
- To: mathgroup at smc.vnet.net
- Subject: [mg94488] Re: [mg94413] Aligning two PLots
- From: "David Park" <djmpark at comcast.net>
- Date: Sun, 14 Dec 2008 07:41:35 -0500 (EST)
- References: <32057085.1229083866777.JavaMail.root@m02>
The reason the two plots don't normally align, in a GraphicsArray say, is
that the space taken by the y tick values is different. This can be remedied
by using the ImagePadding option and allotting enough space in each plot to
accommodate the tick values in both plots.
plot1 =
Plot[Sin[x], {x, 0, 3 \[Pi]},
ImagePadding -> {{20, 5}, {5, 5}}];
plot2 =
Plot[5000 Sin[x], {x, 0, 3 \[Pi]},
ImagePadding -> {{20, 5}, {5, 5}}];
GraphicsArray[{{plot1}, {plot2}}]
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/
From: Nikolaus Rath [mailto:Nikolaus at rath.org]
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?
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