Søren Nielsen wrote:
>
>     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 :)
Of the top of my head and hand waving over all of the gory details -- 
you could try drawing the line to one plot, saving the image (to a 
CStringIO in-memory "file"), and then loading that into another plot 
using imshow().  (Easier said than done, but should be theoretically 
possible, and not extremely slow).

Mike
>
> 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
>         <mailto: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
>
>

-- 
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