From: <seb...@fr...> - 2005-07-28 15:15:48
|
Hi, First of all thank you for this great package. 1/ The matshow function computes the aspect ratio of the figure with: in matplotlib/pylab.py def matshow(*args,**kw): ... # Extract actual aspect ratio of array and make appropriately sized f= igure w,h =3D figaspect(arr) ... before displaying it. figaspect takes the array as an argument and compute its aspect ratio wit= h: in matplotlib/figure.py def figaspect(arr): ... # Extract the aspect ratio of the array nr,nc =3D arr.shape[:2] arr_ratio =3D float(nr)/nc ... Could it be changed such that figaspect takes a float as its argument and= the 2 lines to compute arr_ratio are moved from figaspect to matshow before cal= ling figaspect ? (+ change the figaspect doc string) It will make figaspect more general and allow us to create a figure with = a given aspect ratio without copying/pasting of nearly all the figaspect machiner= y. 2/ Does anybody intend to add a Patch object to draw polygons with holes (I = do not know how to do it) ? Thank you, Seb |