From: Jochen V. <vo...@se...> - 2004-11-04 16:48:07
|
Hello John, On Thu, Nov 04, 2004 at 09:16:59AM -0600, John Hunter wrote: > 3 >>> print ax.get_position() > [0.125, 0.10999999999999999, 0.77500000000000002, 0.79000000000000004] Oh, ok! This explains why my picture is not centred. 0.125 + 0.775 + 0.1 =3D 1, so the left margin is larger. I guess this is to make space for labels, isn't it? > Does the code below help? >=20 > from matplotlib.matlab import * > from matplotlib.patches import Rectangle >=20 > f =3D figure(figsize=3D(3,2),frameon=3DFalse) >=20 > # ax is 0.8*3 inches wide, 0.8*2inches tall, ie 2.4 x 1.6 > ax =3D axes([0.1, 0.1, 0.8, 0.8]) > p =3D Rectangle((0.1, 0.1), 0.8, 0.8, fill=3DTrue, fc=3D(1,0,0)) > ax.add_patch(p) > axis([-0.5,2.5,-0.5,1.5]) > savefig('test.ps') Yes, it does. Thanks a lot! All the best, Jochen --=20 http://seehuhn.de/ |