YAArrow.figure gets overwritten during superclass construction #930
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SVN revision 4909 seems to have broken the YAArrow constructor by changing its dpi parameter to be figure instead, while Artist's constructor sets self.figure to None. Since
YAArrow.__init__
calls the Patch constructor after setting self.figure, and the Patch constructor calls the Artist constructor, the constructed YAArrow object ends up with self.figure == None.This causes YAArrow patches to not be usable in a PatchCollection because that constructor calls get_path, which attempts to access the YAArrow's dpi from the figure member:
To work around the issue, it suffices to simply set the figure manually after constructing the YAArrow:
(For a diff of SVN revision 4909, see http://www.mail-archive.com/[email protected]/msg01214.html )
I'm using version 1.1.1~rc1+git20120423-0ubuntu1, but from scanning the source on github it looks as though the bug is still present.