On Fri, Sep 17, 2010 at 4:57 PM, John Hutchinson <jmhut...@gmail.com> wrote:

> Hi:
>
> I am trying to make a 1row by 3 column plot with subplot, and I want
> the first plot (subplot(131)) to have equal aspect ratio, but the rest
> can auto scale.
>
> My code results in an empty plot for the 1st column subplot whenever I
> try to use the set_aspect('equal')
>
> Any ideas?
>
> Thanks
> John
>
>
> figure(1)
> hold(True)
> subplot(131)
> plot(RX,RY)
> title('Geometry')
> xlabel('um')
> ylabel('um')
> scatter(AX,AY,c='green',marker='s')
> plot([AX,0],[AY,0],linewidth=3,c='green')
> scatter(BX,BY,c='purple',marker='s')
> plot([0,BX],[0,BY],linewidth=3,c='purple')
> scatter(DX,DY,c='red',marker='o')
> axes().set_aspect('equal')
> hold(False)
> subplot(132)
> scatter(e1.real,gi,marker='s')
> title('E1 by tooth')
> subplot(133)
> scatter(e2.real,gi,marker='+')
> title('E2 by tooth')
> show()
>
>
This is most likely because of the call to axes().  I can't remember for
sure, but it might be automatically clearing out the axes.  Replace axes()
with subplot(131):

subplot(131).set_aspect('equal')

The subplot(131) call should recognize that that particular axes has already
been made and just simply retrieves it without modifying anything.

I hope this helps!
Ben Root
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to