two lines:
ax.set_xlim(min(ax.get_xlim()+ax.get_ylim()),max(ax.get_xlim()+ax.get_ylim()))
ax.set_ylim(ax.get_xlim())
chao
2011/10/18 Chao YUE <chaoyue...@gmail.com>
> Dear all,
>
> I am making a 1:1 ratio plot to compare data.
> I can write a small part of code to detect which range of the x or y axis
> is bigger and then adjust the axis of shorter range to have the same range
> with the longer one.
> and use set_aspect('equal') method to have the same tick interval on both
> axises.
> but is there an automatic method to do this job?
>
> Thanks,
>
> Chao
>
> --
>
> ***********************************************************************************
> Chao YUE
> Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
> UMR 1572 CEA-CNRS-UVSQ
> Batiment 712 - Pe 119
> 91191 GIF Sur YVETTE Cedex
> Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
>
> ************************************************************************************
>
>
--
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users