[Python-modules-commits] [python-mplexporter] 35/135: add zorder to element styles
Wolfgang Borgert
debacle at moszumanska.debian.org
Tue Sep 23 21:19:01 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 00a672df6062016b71783a44c35942fdc033a4e5
Author: Jake Vanderplas <vanderplas at astro.washington.edu>
Date: Mon Feb 24 10:29:20 2014 -0800
add zorder to element styles
---
mplexporter/exporter.py | 6 ++++--
mplexporter/utils.py | 4 ++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/mplexporter/exporter.py b/mplexporter/exporter.py
index a2b957b..1b1948d 100644
--- a/mplexporter/exporter.py
+++ b/mplexporter/exporter.py
@@ -187,7 +187,8 @@ class Exporter(object):
styles = {'linewidth':collection.get_linewidths(),
'facecolor':collection.get_facecolors(),
'edgecolor':collection.get_edgecolors(),
- 'alpha':collection._alpha}
+ 'alpha':collection._alpha,
+ 'zorder':collection.get_zorder()}
offset_dict = {"data": "before",
"screen": "after"}
@@ -207,4 +208,5 @@ class Exporter(object):
self.renderer.draw_image(imdata=self.image_base64_data(image),
extent=image.get_extent(),
coordinates="data",
- style={"alpha": image.get_alpha()})
+ style={"alpha": image.get_alpha(),
+ "zorder": image.get_zorder()})
diff --git a/mplexporter/utils.py b/mplexporter/utils.py
index 8c6cc7a..c110f25 100644
--- a/mplexporter/utils.py
+++ b/mplexporter/utils.py
@@ -103,6 +103,7 @@ def get_path_style(path):
style['facecolor'] = color_to_hex(path.get_facecolor())
style['edgewidth'] = path.get_linewidth()
style['dasharray'] = get_dasharray(path)
+ style['zorder'] = path.get_zorder()
return style
@@ -115,6 +116,7 @@ def get_line_style(line):
style['color'] = color_to_hex(line.get_color())
style['linewidth'] = line.get_linewidth()
style['dasharray'] = get_dasharray(line)
+ style['zorder'] = line.get_zorder()
return style
@@ -136,6 +138,7 @@ def get_marker_style(line):
+ Affine2D().scale(markersize, -markersize))
style['markerpath'] = SVG_path(markerstyle.get_path(),
markertransform)
+ style['zorder'] = line.get_zorder()
return style
@@ -150,4 +153,5 @@ def get_text_style(text):
style['halign'] = text.get_horizontalalignment() # left, center, right
style['valign'] = text.get_verticalalignment() # baseline, center, top
style['rotation'] = text.get_rotation()
+ style['zorder'] = text.get_zorder()
return style
--
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