Richard Brown wrote:
> Hi there,
> 
> I'm pretty new to python; I'm in the process of switching from Matlab.
> I do quite a bit of image processing in my research, and while
> pylab/matplotlib seems to be a great plotting library, some of the
> quirks seem just a little bit frustrating - I'm hoping for some
> enlightenment :)
> 
> When I use imshow or matshow to display an array, the points with
> index (m, n) are displayed with the pixels centred at (0.5 + m, 0.5 +
> n). Is there a setting somewhere to make it so that the centres of the
> pixels are at the index values rather than their bottom left corners?
> Or must I be always adding 0.5 to things to make them appear in the
> right places?

Coincidentally, a few days ago I made this change for matshow; I had 
made it in spy some time ago.  I have so far left imshow alone; isn't 
its present behavior consistent with Matlab?  That is not necessarily a 
good reason for leaving it the way it is, but it is reason for some 
caution.  I suspect quite a few people may prefer it the way it is; 
let's see who responds, and what opinions are voiced.

One way of maintaining compatibility (if it is indeed compatible now, 
and if this is judged desirable) would be to add a kwarg and/or rc 
option.  But if there is a consensus that imshow should by default put 
index ticks at cell centers, then I will be happy to make that change.

Eric

> 
> Thanks, I appreciate any help
> 
> Richard


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to