MathGroup Archive 2010

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

Search the Archive

Re: Lining up y axes and sizing plot areas

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109323] Re: Lining up y axes and sizing plot areas
  • From: "David Park" <djmpark at comcast.net>
  • Date: Thu, 22 Apr 2010 03:29:16 -0400 (EDT)

Use an ImagePadding option in both plots to leave the same amount of padding
on the left to accommodate either set of tick values. This will mean there
will be extra space for the integer y ticks, but that's what you need to do
to make things line up.

Column[
 {Plot[2 Sin[x] + x, {x, 0, 15},
   Filling -> Bottom,
   ImagePadding -> {{20, 5}, {5, 5}}],
  Plot[{Sin[x], Sin[2 x], Sin[3 x]}, {x, 0, 2 Pi},
   ImagePadding -> {{20, 5}, {5, 5}}]}] 


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  


From: Garapata [mailto:warsaw95826 at mypacks.net] 

Hi everybody!

I have two ListLinePlots of different time series analysis.  They each
have the same number of data points along the x axis.  I want to show
them one above the other, but have their respective time scales line
up properly, e.g., the first data points lining up  and the last data
points lining up.  To do this the display of the graphs themselves,
exclusive of their y axises need to be the same size.

Another way to say this, the y-axes for both charts should line up
then everything to the right of the axes should be the same width.

Mine don=92t line up because one of my plots has a integer scaled y-axis
(running from 1 to  50) and the other has a decimal scale with 2 or
sometimes 3 positions to the right of the decimal.

I have ListLinePlots, but the following will illustrate the problem:

Column[{Plot[2 Sin[x] + x, {x, 0, 15}, Filling -> Bottom],
Plot[{Sin[x], Sin[2 x], Sin[3 x]}, {x, 0, 2 Pi}]}]

Thanks in advance...




  • Prev by Date: Download as Live Mathematica from Wolfram|Alpha
  • Next by Date: Re: Dynamic evaluation of layered networks
  • Previous by thread: Lining up y axes and sizing plot areas
  • Next by thread: Dynamic evaluation of layered networks