On Aug 17, 2010, at 11:02 AM, Bala subramanian wrote: > Friends, > > I am trying to make a figure for publication. I am making a double column > figure of 7inch as per journal guidelines. The figure comes out nicely but > the final size of the figure that is saved is not what i have given in > 'figsize'. It is 10inch X 5.38 inch. How can i make mpl to create the figure > of exact size and resolution? > > fig=plt.figure(figsize=(7,4)) > fig.subplots_adjust(wspace=0.1,hspace=0.1) > ax1=fig.add_subplot(221) > ax2=fig.add_subplot(222,sharex=ax1,sharey=ax1) > ax3=fig.add_subplot(223,sharex=ax1,sharey=ax1) > ax4=fig.add_subplot(224,sharex=ax1,sharey=ax1) > > Thanks, > Bala
That's strange. I don't see any problems with the figure size on my system. This may seem like a silly question, but do you have the same sizing issue for the following code: import matplotlib.pyplot as plt fig=plt.figure(figsize=(7,4)) fig.subplots_adjust(wspace=0.1,hspace=0.1) ax1=fig.add_subplot(221) ax2=fig.add_subplot(222,sharex=ax1,sharey=ax1) ax3=fig.add_subplot(223,sharex=ax1,sharey=ax1) ax4=fig.add_subplot(224,sharex=ax1,sharey=ax1) plt.savefig('test.pdf') # works fine on my system with png, pdf, and eps I just want to make sure you aren't altering the figure in any other way before you save. Are you using savefig or are you saving from a GUI window? Are you on a current version of matplotlib (if yes, you might be interested in `plt.subplots` to create your axes)? What image format are you using? -Tony ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users