import matplotlib.pyplot as plt from scipy import *
my_fig = plt.figure(figsize=(7,6), dpi=100) plot_ax1 = plt.subplot(3,1,1) a = rand(100)
b = rand(100) + rand() plt.scatter(a, b) plot_ax1.set(xticklabels=)
plot_ax1.set_aspect('equal', adjustable='box') plt.savefig('myplot.pdf')
when i run this, i get a small square scatter plot in the middle of the page. i want this plot to be scaled to be bigger. if i remove the set_aspect() call, the plot becomes bigger in the horizontal direction, and is rectangular.
any ideas how to fix this? thanks again.
On Sun, May 24, 2009 at 9:24 PM, Eric Firing <efiring@…202… > <mailto:efiring@…202…>> wrote:
per freem wrote:
i have a series of subplots organized in a column (3x1). i
noticed that if i plot them then matplotlib tends to make the
x-axis long and the y-axis short, so the plot is really
rectangular. how can i make it more square? if i do:
f = figure(figsize=(7,6), dpi=100)
p1 = subplot(3,1,1)
# make axes square
p2 = subplot(3,1,2)
# etc for third subplot...
then the subplots i get are square, but very small and squished
compared to the space they have in the figure (ie what i set in
figsize.) how can i fix this? i just want to have square axes,
but have each subplot take up as much space as it would if i
didnt set square axes... it works fine for the rectangular axes
Maybe what you are looking for is
It is not clear from your message, but try the modification above
and see if it does what you want.