[Python-modules-commits] [python-mplexporter] 60/135: comment-out broken legend rendering
Wolfgang Borgert
debacle at moszumanska.debian.org
Tue Sep 23 21:19:04 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to branch master
in repository python-mplexporter.
commit bbcf088734c04ade47d066fe08fe0e609577f0a9
Author: Jake Vanderplas <vanderplas at astro.washington.edu>
Date: Wed Feb 26 13:35:27 2014 -0800
comment-out broken legend rendering
---
mplexporter/exporter.py | 38 +++++++++++++++++++++-----------------
1 file changed, 21 insertions(+), 17 deletions(-)
diff --git a/mplexporter/exporter.py b/mplexporter/exporter.py
index ffdcfa7..6ef08a9 100644
--- a/mplexporter/exporter.py
+++ b/mplexporter/exporter.py
@@ -121,23 +121,27 @@ class Exporter(object):
self.draw_collection(ax, collection)
for image in ax.images:
self.draw_image(ax, image)
- if ax.legend_ is not None:
- for child in ax.legend_.get_children()[:-1]:
- if isinstance(child, matplotlib.patches.Patch):
- self.draw_patch(ax, child)
- for child in ax.legend_.get_children():
- if isinstance(child, matplotlib.text.Text):
- if not (child is ax.legend_.get_children()[-1]
- and child.get_text() == 'None'):
- self.draw_text(ax, child)
- elif isinstance(child, matplotlib.patches.Patch):
- pass
- elif isinstance(child, matplotlib.lines.Line2D):
- self.draw_line(ax, child)
- else:
- warnings.warn("Ignoring legend element: "
- "{0}".format(child))
-
+
+ # TODO: figure out how to specify legends appropriately...
+
+ #legend = ax.get_legend()
+ #if legend is not None:
+ # for child in ax.legend_.get_children():
+ # if child is legend.legendPatch:
+ # self.draw_patch(ax, child)
+ # if isinstance(child, matplotlib.patches.Patch):
+ # self.draw_patch(ax, child)
+ # elif isinstance(child, matplotlib.text.Text):
+ # if not (child is ax.legend_.get_children()[-1]
+ # and child.get_text() == 'None'):
+ # self.draw_text(ax, child)
+ # elif isinstance(child, matplotlib.lines.Line2D):
+ # self.draw_line(ax, child)
+ # elif isinstance(child, matplotlib.offsetbox.PackerBase):
+ # pass
+ # else:
+ # warnings.warn("Legend element %s not impemented"
+ # & child)
def draw_line(self, ax, line):
"""Process a matplotlib line and call renderer.draw_line"""
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-mplexporter.git
More information about the Python-modules-commits
mailing list