## Re: [Matplotlib-users] imshow with different axes

 Re: [Matplotlib-users] imshow with different axes From: John Hunter - 2004-07-22 18:27:17 >>>>> "Jeffery" == Jeffery D Collins writes: Jeffery> Is there a (convenient) matplotlib(v0.60.2) equivalent to Jeffery> the matlab imshow(x,y,A), where x and y are 2-tuples Jeffery> consisting of the bounds of the x and y axes, Jeffery> respectively? I have done some limited axis manipulation Jeffery> using the set_xticklabels and set_yticklabels methods, Jeffery> but that results in an unattractive plot. If I am understanding you correctly >>> imshow(A, extent=(xmin, ymin, xmax, ymax)) See also http://matplotlib.sf.net/matplotlib.matlab.html#-imshow and http://matplotlib.sf.net/examples/image_demo2.py. Hope this helps, JDH

 [Matplotlib-users] imshow with different axes From: Jeffery D. Collins - 2004-07-22 18:14:24 Is there a (convenient) matplotlib(v0.60.2) equivalent to the matlab imshow(x,y,A), where x and y are 2-tuples consisting of the bounds of the x and y axes, respectively? I have done some limited axis manipulation using the set_xticklabels and set_yticklabels methods, but that results in an unattractive plot. Thanks! -- Jeff
 Re: [Matplotlib-users] imshow with different axes From: John Hunter - 2004-07-22 18:27:17 >>>>> "Jeffery" == Jeffery D Collins writes: Jeffery> Is there a (convenient) matplotlib(v0.60.2) equivalent to Jeffery> the matlab imshow(x,y,A), where x and y are 2-tuples Jeffery> consisting of the bounds of the x and y axes, Jeffery> respectively? I have done some limited axis manipulation Jeffery> using the set_xticklabels and set_yticklabels methods, Jeffery> but that results in an unattractive plot. If I am understanding you correctly >>> imshow(A, extent=(xmin, ymin, xmax, ymax)) See also http://matplotlib.sf.net/matplotlib.matlab.html#-imshow and http://matplotlib.sf.net/examples/image_demo2.py. Hope this helps, JDH
 Re: [Matplotlib-users] imshow with different axes From: Jeffery D. Collins - 2004-07-22 18:45:18 On Thursday 22 July 2004 12:03 pm, John Hunter wrote: > >>>>> "Jeffery" == Jeffery D Collins writes: > > Jeffery> Is there a (convenient) matplotlib(v0.60.2) equivalent to > Jeffery> the matlab imshow(x,y,A), where x and y are 2-tuples > Jeffery> consisting of the bounds of the x and y axes, > Jeffery> respectively? I have done some limited axis manipulation > Jeffery> using the set_xticklabels and set_yticklabels methods, > Jeffery> but that results in an unattractive plot. > I'm getting an unexpected keyword error on 'extent'. Is this keyword available in the latest release or just in CVS? > If I am understanding you correctly > > >>> imshow(A, extent=(xmin, ymin, xmax, ymax)) > > See also http://matplotlib.sf.net/matplotlib.matlab.html#-imshow and > http://matplotlib.sf.net/examples/image_demo2.py. > > Hope this helps, > JDH -- ----------------------------------------------------------------- Jeffery D. Collins, Ph.D. Vexcel Corp. Sr. Engineer 1690 38th St. Voice: (303)583-0228 Boulder, CO 80301 Fax: (303)583-0246 vexcel.com
 Re: [Matplotlib-users] imshow with different axes From: John Hunter - 2004-07-22 19:08:58 >>>>> "Jeffery" == Jeffery D Collins writes: Jeffery> I'm getting an unexpected keyword error on 'extent'. Is Jeffery> this keyword available in the latest release or just in Jeffery> CVS? I must be getting soft in the head. I thought this was in the 0.60.2 release, but you're right, it is not. Just checked the CHANGELOG. There is a way to do it in 0.60.2, but it is deprecated in CVS. Arggg. Your choices * wait for 0.61 (next week) * build from CVS - best solution. Fixes some problems with image extent plus image.origin='lower' reported earlier on matplotlib-users. * use the (deprecated in CVS/0.61) im = imshow(A) gca().set_image_extent(0, 25, 0, 25) Sorry for the confusions, JDH
 Re: [Matplotlib-users] imshow with different axes From: Jeffery D. Collins - 2004-07-22 19:21:39 I grabbed the CVS version and it works fine. Thanks for the help! On Thursday 22 July 2004 12:45 pm, John Hunter wrote: > >>>>> "Jeffery" == Jeffery D Collins writes: > > Jeffery> I'm getting an unexpected keyword error on 'extent'. Is > Jeffery> this keyword available in the latest release or just in > Jeffery> CVS? > > I must be getting soft in the head. I thought this was in the 0.60.2 > release, but you're right, it is not. Just checked the CHANGELOG. > There is a way to do it in 0.60.2, but it is deprecated in CVS. > Arggg. > > Your choices > > * wait for 0.61 (next week) > > * build from CVS - best solution. Fixes some problems with image > extent plus image.origin='lower' reported earlier on > matplotlib-users. > > * use the (deprecated in CVS/0.61) > > im = imshow(A) > gca().set_image_extent(0, 25, 0, 25) > > Sorry for the confusions, > JDH -- ----------------------------------------------------------------- Jeffery D. Collins, Ph.D. Vexcel Corp. Sr. Engineer 1690 38th St. Voice: (303)583-0228 Boulder, CO 80301 Fax: (303)583-0246 vexcel.com