|
From: Michiel de H. <mjl...@ya...> - 2010-11-12 04:18:49
|
Thanks for your reply.
Just to make sure I understand correctly: Do you still think that there is a bug in the Mac OS X backend? Or does the bug only appear with wx?
Best,
--Michiel.
--- On Thu, 11/11/10, Garry Willgoose <Gar...@ne...> wrote:
> From: Garry Willgoose <Gar...@ne...>
> Subject: Re: [Matplotlib-users] python v ipython problem in imshow()
> To: "Michiel de Hoon" <mjl...@ya...>
> Cc: "Garry Willgoose" <Gar...@ne...>, "John Hunter" <jd...@gm...>, mat...@li...
> Date: Thursday, November 11, 2010, 10:00 PM
> Michiel,
>
> With some digging around in my own code I have been
> able to reproduce the bug with the matplotlib example. My
> code uses wxPython and somewhere it sets the backend to 'WX'
> (this seems to require a bit more than simply 'import wx'
> but I haven't pursued what it might be ... there are several
> thousand lines of code before I get to the plotting).
> the code below triggers the problem
>
> import wx
> import matplotlib
> print 'matplotlib backend',matplotlib.rcParams['backend']
> matplotlib.use('WX')
> print 'matplotlib backend',matplotlib.rcParams['backend']
>
> from pylab import *
> x = arange(100.0); x.shape = 10,10
> interp = 'bilinear';
> lim = -2,11,-2,6
> subplot(211, axisbg='g')
> title('blue should be up')
> imshow(x, origin='upper', interpolation=interp)
> subplot(212, axisbg='y')
> title('blue should be down')
> imshow(x, origin='lower', interpolation=interp)
> show()
>
>
> if I set the backend to WxAgg then the problem doesn't
> occur and if I don't set it all (so its MacOSX) then all is
> fine. In the example above the top graph is fine but the
> lower one is solid yellow. This behaviour is different from
> my code which shows the same image for both origin='upper'
> and 'lower'. My platform is enthought 6.1-1 with matplotlib
> 0.99.1.1.
>
> Given that WXAgg works are there any are the implications
> of WXAgg early in my plotting part of the code (this may
> result in multiple calls to set the backend) versus letting
> matplotlib itself set WX. I just tried to set WXAgg
> immediately after the first 'import wx' after program
> startup but it had set to WX by the time it got the place
> where the plots were made.
>
> > I haven't been able to replicate this bug. With all
> matplotlib versions
> > I tried (including 0.99.0, 0.99.1., 0.99.1.1,
> 0.99.1.2, 1.0.0, and the current source code in svn), this
> example works correctly with the Mac OS X backend.
> > Garry, what is the exact code that you are using?
> >
> > --Michiel.
> >
> >
> > --- On Wed, 11/10/10, John Hunter <jd...@gm...>
> wrote:
> >
> >> From: John Hunter <jd...@gm...>
> >> Subject: Re: [Matplotlib-users] python v ipython
> problem in imshow()
> >> To: "Michiel de Hoon" <mjl...@ya...>
> >> Cc: "Garry Willgoose" <Gar...@ne...>,
> mat...@li...
> >> Date: Wednesday, November 10, 2010, 10:59 AM
> >> On Wed, Nov 10, 2010 at 9:48 AM,
> >> Michiel de Hoon <mjl...@ya...>
> >> wrote:
> >>> Garry, if the bug still exists in matplotlib
> 1.0 could
> >> you open a bug report for it?
> >>
> >>
> >> I think Gary doesn't have easy access to
> 1.0. Here is
> >> the relevant
> >> example if anyone has 1.0 on macosx to test with
> >>
> >> http://matplotlib.sourceforge.net/examples/pylab_examples/image_origin.html
> >>
> >> JDH
> >>
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Centralized Desktop Delivery: Dell and VMware
> Reference Architecture
> > Simplifying enterprise desktop deployment and
> management using
> > Dell EqualLogic storage and VMware View: A highly
> scalable, end-to-end
> > client virtualization framework. Read more!
> > http://p.sf.net/sfu/dell-eql-dev2dev
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> ====================================================================
> Prof Garry Willgoose,
> Australian Professorial Fellow in Environmental
> Engineering,
> Director, Centre for Climate Impact Management (C2IM),
> School of Engineering, The University of Newcastle,
> Callaghan, 2308
> Australia.
>
> Centre webpage: www.c2im.org.au
>
> Phone: (International) +61 2 4921 6050 (Tues-Fri AM); +61 2
> 6545 9574 (Fri PM-Mon)
> FAX: (International) +61 2 4921 6991 (Uni); +61 2 6545 9574
> (personal and Telluric)
> Env. Engg. Secretary: (International) +61 2 4921 6042
>
> email: gar...@ne...;
> g.w...@te...
> email-for-life: gar...@al...
> personal webpage: www.telluricresearch.com/garry
> ====================================================================
> "Do not go where the path may lead, go instead where there
> is no path and leave a trail"
>
> Ralph Waldo Emerson
> ====================================================================
>
>
>
>
>
>
|