[Python-modules-commits] [python-mplexporter] 69/135: add xlabel, ylabel, title explicitly
Wolfgang Borgert
debacle at moszumanska.debian.org
Tue Sep 23 21:19:05 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 7b7010f52852f3d70a460cf6736bbb7782cbc219
Author: Jake Vanderplas <vanderplas at astro.washington.edu>
Date: Sat Mar 1 07:14:31 2014 -0800
add xlabel, ylabel, title explicitly
---
mplexporter/exporter.py | 3 +++
mplexporter/utils.py | 5 +----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/mplexporter/exporter.py b/mplexporter/exporter.py
index daa862c..982e250 100644
--- a/mplexporter/exporter.py
+++ b/mplexporter/exporter.py
@@ -123,6 +123,9 @@ class Exporter(object):
self.draw_line(ax, line)
for text in ax.texts:
self.draw_text(ax, text)
+ for text in [ax.xaxis.label, ax.yaxis.label, ax.title]:
+ if(hasattr(text, 'get_text') and text.get_text()):
+ self.draw_text(ax, text, force_trans=ax.transAxes)
for artist in ax.artists:
# TODO: process other artists
if isinstance(artist, matplotlib.text.Text):
diff --git a/mplexporter/utils.py b/mplexporter/utils.py
index 1f5f2e9..75832e9 100644
--- a/mplexporter/utils.py
+++ b/mplexporter/utils.py
@@ -242,10 +242,7 @@ def get_figure_properties(fig):
def get_axes_properties(ax):
- props = {'xlabel': ax.get_xlabel(),
- 'ylabel': ax.get_ylabel(),
- 'title': ax.get_title(),
- 'axesbg': color_to_hex(ax.patch.get_facecolor()),
+ props = {'axesbg': color_to_hex(ax.patch.get_facecolor()),
'axesbgalpha': ax.patch.get_alpha(),
'bounds': ax.get_position().bounds,
'dynamic': ax.get_navigate(),
--
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