small backend change

I just made a minor change in the backend API. The faceColor argument
(formerly a color arg) for draw_rectangle, draw_arc, etc... is now a
graphics context instance. I updated all the backends in CVS.

Unfortunately Jeremy, there now appears to be a bug in wx. I can't
tell if it was something I did or something that was there already,
because with wx swallowing the exceptions, I can't find it! I also
added a few more debug print messages to functions that don't have
them already, but still couldn't track it down. Sorry for the
trouble.

Note to any wx savvy readers! Jeremy and I have been struggling over
the tendency of wx to eat exceptions in a way that we can't recover.
If anyone knows how to disable this in wxpython, please contact us.

JDH

Note to any wx savvy readers! Jeremy and I have been struggling over
the tendency of wx to eat exceptions in a way that we can't recover.
If anyone knows how to disable this in wxpython, please contact us.

JDH

This might put you on the right track:
http://lists.wxwindows.org/archive/wxPython-users/msg10801.html

HTH,
David Moore

···

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.580 / Virus Database: 367 - Release Date: 2004/02/06

I have found the location of the error, but have not yet determined how the
problem arises:

Basically, when savefig() is called by the script, the first draw_rectangle()
call fails an assert gc.OK() statement. I have not determined why Python is
not receiving the AssertException - my conjecture is that the call to gc.Ok()
is causing an exception in the C++ code - I will probably have to use a debug
version of the wx libraries and a debugger to verify this.

The stack frame when the exception is raised is:

__main__ #40
matplotlib.matlab.savefig #798
matplotlib.backends.backend_wx #812
matplotlib.artist.draw #86
matplotlib.figure._draw #65
matplotlib.artist.draw #86
matplotlib.patches._draw #76
matplotlib.patches._derived_draw #154
matplotlib.backends.backend_wx #403

I'll let you know how I get on...

Jeremy

···

On Tuesday 10 February 2004 9:30 pm, John Hunter wrote:

Unfortunately Jeremy, there now appears to be a bug in wx. I can't
tell if it was something I did or something that was there already,
because with wx swallowing the exceptions, I can't find it! I also
added a few more debug print messages to functions that don't have
them already, but still couldn't track it down. Sorry for the
trouble.

Hi John,

I'm working with Perry Greenfield's group on a Tkinter/Paint backend for
matplotlib. I noticed today that the paint facecolor had changed to
black. Looking into it, there were a few more edits to
backend_paint.py needed as a result of the interface change above. I
also noticed that the paint version of draw_polygons needed a little
code to get it working. Attached is a patch for both.

Regards,
Todd

backend_paint.patch (3.57 KB)

···

On Tue, 2004-02-10 at 16:30, John Hunter wrote:

I just made a minor change in the backend API. The faceColor argument
(formerly a color arg) for draw_rectangle, draw_arc, etc... is now a
graphics context instance. I updated all the backends in CVS.

--
Todd Miller <jmiller@...31...>