[AstroPy] plot of data and residuals
Tue Aug 10 08:32:06 CDT 2010
in fact, there was no direct way of doing this in the pre-1.0 versions
of Matplotlib. In the 1.0.0 version there is something called
'gridspec' which does exactly what you want.
Anyway, if you can't install v.1.0.0 I found a way of doing this,
shown below (I put only the relevant code)
. . .
# definitions for the axes
left = 0.05
width = 0.65
bottom = 0.05
height = 0.65
bottom_h = left+width+0.02
left_h = left+width+0.02
rect_image = [left, bottom, width, height]
rect_profx = [left, bottom_h, width, 0.2]
rect_profy = [left_h, bottom+0.04, 0.2, height]
# start with a rectangular Figure
fig = P.figure(1, figsize=(8,8))
axProfX = P.axes(rect_profx)
axImage = P.axes(rect_image)
axProfY = P.axes(rect_profy)
. . .
When you need to access plot properties in a particular subplot, you
must invoke the functions via the axis class instances, axProfY,
axProfX, and so on...
Fabricio Ferrari [www.ferrari.pro.br]
Universidade Federal do Pampa
More information about the AstroPy