[Python-modules-commits] [python-mplexporter] 52/135: pass through artist texts
Wolfgang Borgert
debacle at moszumanska.debian.org
Tue Sep 23 21:19:03 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 4e295b6e150fd97222664a08272cae53f6d51925
Author: Jake Vanderplas <vanderplas at astro.washington.edu>
Date: Tue Feb 25 14:28:46 2014 -0800
pass through artist texts
---
mplexporter/exporter.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/mplexporter/exporter.py b/mplexporter/exporter.py
index cfb4ab9..6fe0571 100644
--- a/mplexporter/exporter.py
+++ b/mplexporter/exporter.py
@@ -7,6 +7,8 @@ relevant pieces to a renderer.
import io
from . import utils
+import matplotlib
+
class Exporter(object):
"""Matplotlib Exporter
@@ -126,19 +128,18 @@ class Exporter(object):
for line in ax.lines:
self.draw_line(ax, line)
for text in ax.texts:
- # xlabel and ylabel are passed as arguments to the axes
- # we don't want to pass them again here
- if text is ax.xaxis.label:
- continue
- if text is ax.yaxis.label:
- continue
self.draw_text(ax, text)
+ for artist in ax.artists:
+ # TODO: process other artists
+ if isinstance(artist, matplotlib.text.Text):
+ self.draw_text(ax, artist)
for patch in ax.patches:
self.draw_patch(ax, patch)
for collection in ax.collections:
self.draw_collection(ax, collection)
for image in ax.images:
self.draw_image(ax, image)
+
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