hi eric, i tried your suggestion but it still did not work. here's a code snippet that demonstrates what i am trying to do:
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 <efir...@hawaii.edu> wrote: > per freem wrote: > >> hi all, >> >> 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) >> plot(....) >> # make axes square >> p1.set_aspect('equal') >> >> p2 = subplot(3,1,2) >> plot(....) >> p2.set_aspect('equal') >> >> # 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 case. >> > > Maybe what you are looking for is > p1.set_aspect('equal', adjustable='datalim') > > It is not clear from your message, but try the modification above and see > if it does what you want. > > Eric >
------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users