Re: [Matplotlib-users] Same X and Y scale

2010-07-30 Thread Nikolaus Rath
Ryan May writes: > On Jul 30, 2010, at 14:34, Nikolaus Rath > wrote: > >> Hi, >> >> Consider this: >> >> X = np.linspace(0.70, 1.1, 100) >> Y = np.linspace(-1.19, 1.19, 70) >> (Xs, Ys) = np.meshgrid(X, Y) >> Z = np.sqrt((Xs-0.9)**2 + Ys**2) - 0.10 >> fig = plt.figure() >> ax = fig.add_subplot(

Re: [Matplotlib-users] Same X and Y scale

2010-07-30 Thread Ryan May
On Jul 30, 2010, at 14:34, Nikolaus Rath wrote: > Hi, > > Consider this: > > X = np.linspace(0.70, 1.1, 100) > Y = np.linspace(-1.19, 1.19, 70) > (Xs, Ys) = np.meshgrid(X, Y) > Z = np.sqrt((Xs-0.9)**2 + Ys**2) - 0.10 > fig = plt.figure() > ax = fig.add_subplot(111) > ax.contour(X, Y, Z) > fig.s

[Matplotlib-users] Same X and Y scale

2010-07-30 Thread Nikolaus Rath
Hi, Consider this: X = np.linspace(0.70, 1.1, 100) Y = np.linspace(-1.19, 1.19, 70) (Xs, Ys) = np.meshgrid(X, Y) Z = np.sqrt((Xs-0.9)**2 + Ys**2) - 0.10 fig = plt.figure() ax = fig.add_subplot(111) ax.contour(X, Y, Z) fig.show() This works, but gives the y axis a different scale than the x axis