Chris Barker wrote:
> Hi all,
>
> I usually use MPL embedded in wx, so I haven't noticed these before 
> but with the pylab window:
>
> 1) A couple icons seem to be missing. See screenshot enclosed.
I believe that's the way disabled buttons are drawn on Windows (or 
perhaps we need to provide disabled versions of the bitmaps on 
Windows).  Do they appear after you have panned/zoomed the plot?
>
> 2) The save button doesn't work, as I get a "cannot return std::string 
> from a Unicode object" error. This is with a unicode build of 
> wxPython. I've had this same problem with my code. This issue is that 
> the savefig code can't handle unicode (regular old fopen, I think). 
> Here are two solutions:
>
> 1) use:
>
> filename.encode('ASCII', 'replace')
>
> on the string before using it, so that you'll get an odd name with 
> non-ascii charactors but at least it will work.
That seems undesirable -- you'll end up with a filename with question 
marks in it.
>
> 2) Use:
> F.savefig(open(path, "w"), dpi=dpi)
This is exactly what matplotlib the *Agg backends do on the 0.91.x 
maintenance branch and the trunk.  Unfortunately, 0.91.2 (the latest 
release) still has this bug.  This may be reason enough to push out a 
new maintenance release of 0.91.x, but I say that having done it before ;)
>
> Python's open allows unicode filenames, and I was told that recent 
> versions of MPL can take a file, rather than just aname, without an 
> unacceptable performance hit, though in my code, without the latest 
> MPL, I get an invalid PNG.
Which version of MPL produces an invalid PNG?  I'd like to track that 
down.  It may be Windows-specific.

Cheers,
Mike
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> 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-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>   

-- 
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-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to