|
From: Benjamin R. <ben...@ou...> - 2012-10-09 14:26:10
|
On Tue, Oct 9, 2012 at 10:11 AM, Anand Sivaramakrishnan <an...@st...>wrote:
> I ask having trouble getting imshow to plot e.g. a detector image
> showing pixels as little rectangular or square uniform color blocks -
> imshow seems to want to interpolate or smooth the image.
> Using imshow("nearest") still produces a 'soft' image.
>
> I have solved this problem earlier using figimage(), but that was a lot
> of work (I had to create a pixel-by-pixel array with all greyscale values
> set myself, and then I was working in pixel coordinates rather than my data
> coordinates). Has anyone figured out how to get imshow to stop smoothing
> the image? Using imshow(… interpolation='none'…) or imshow(…
> interpolation=None…) raise exceptions.
>
> I found NonUniformImage too hard to figure out from the documentation.
>
>
If you are using mpl v1.1.x or greater, try interpolation='none'. Note,
that is the string 'none', not the python None.
Ben Root
|