Sorry if this is a repeat. I just realized I sent the original messages from the wrong email, and I was afraid that this didn't actually get through to the mailing list. I didn't see my emails in the archives, so I figured I'd forward my previous emails to the list.

-Tony

Begin forwarded message:

From: Tony Yu <[EMAIL PROTECTED]>
Date: June 8, 2008 7:53:35 PM EDT
To: FiPy Mailing LIst <[email protected]>
Subject: Re: 'PolyCollection' object has no attribute 'get_patch_transform'

I made some changes to matplotlib2DViewer that adds support of matplotlib 0.98 and *should* be backwards compatible with matplotlib 0.91.x. I've included a diff with the minimal changes needed for compatibility with MPL 0.98 and a second diff file with those changes plus additional changes that you may (or may not) consider useful.

Since the automated tests (setup.py test) can't check the GUIs, I manually ran all the examples with 2D explicitly in the filename and everything *seemed* to work fine. But someone should probably check that the changes don't mess up a setup with MPL 0.91.x. Also, I don't know if these changes reduce the performance gains from revision 2475 (but I don't think they should).

Best,
-Tony

--------------------------------------------------------------------------------

Minimal Changes:
==============
Try add_collection to add PolyCollection and use xCoords/yCoords instead of _verts attribute of PolyCollection for matplotlib 0.98 compatibility.

Attachment: matplotlib2DViewer_minimal.diff
Description: Binary data



--------------------------------------------------------------------------------

Additional Changes:
================
Clean up conditional statements for setting axes limits. Delete old commented-out code. Make cmap an object attribute.


Attachment: matplotlib2DViewer_additional.diff
Description: Binary data




On Jun 4, 2008, at 1:48 PM, Tony Yu wrote:

Just a heads up: matplotlib2DViewer.py is broken in matplotlib 0.98.0. Basically, the speed improvements added in revision 2475 aren't supported in matplotlib 0.98.0. If I revert to the previous revision (2341), everything works fine (but I assume it's slower).

As far as I can see, the problem stems from the fact that PolyCollection no longer inherits from PatchCollection (actually, I don't think PatchCollection exists in 0.98.0).

I assume most people aren't using matplotlib 0.98.0 yet (it was released last week). I'll try to poke around the code this weekend.

-Tony


Reply via email to