On Thu, May 8, 2008 at 3:52 PM, Michael Droettboom <[EMAIL PROTECTED]> wrote:

> You can pass an "interpolation" parameter to imshow, or set a default in
> "image.interpolation" in your matplotlibrc.  From the imshow docstring:
>
>         * interpolation is one of:
>
>           'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36',
>           'hanning', 'hamming', 'hermite', 'kaiser', 'quadric',
>           'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc',
>           'lanczos', 'blackman'
>
>           if interpolation is None, default to rc
>           image.interpolation.  See also th the filternorm and
>           filterrad parameters
>
> 'nearest' is the one you want if you want to see sharp square pixels.
>

Thanks mike, thats exactly what I needed :)


>
> Søren Nielsen wrote:
>
>> Also, if I want to use matplotlib.patches on a canvas where I can actually
>> see individual pixels, is it possible to only draw on the available pixels
>> showing, and not just make a nice high resolution line that is plotted on
>> top of my image?
>>
> I'm not sure I understand the question.  You mean to draw a line using
> large pixels, rather than as a vector?  I don't think there's an easy way on
> that one -- but maybe someone else here can think of a creative way to do
> it.


Yes you understod it correctly, I guess I could figure out what pixels are
involved in a line or a circle for instance, and then do a scatter plot on
those pixels to form the shape.. but it sounds really computationally
heavy.. and I need something that works fast, (the user should be able to
mask a circle in an image using the pixels available in the image) Also the
circle should be shown as it is created (like choosing a center and moving
the mouse enlarges the circle).

Maybe someone tried this? masking stuff in an image seems like a fairly
common thing :)

Thanks for the help!
Soren




>
> Cheers,
> Mike
>
>>
>> Thanks,
>> Soren
>>
>>
>> ------------------------------------------------------------------------
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't
>> miss this year's exciting event. There's still time to save $100. Use
>> priority code J8TL2D2.
>> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
> --
> Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to