[Python-modules-commits] [python-mplexporter] 04/135: add TODO notes

Wolfgang Borgert debacle at moszumanska.debian.org
Tue Sep 23 21:18:57 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 b0c67e8576b3982dbde85bf5c79077814195968a
Author: Jake Vanderplas <vanderplas at astro.washington.edu>
Date:   Sun Feb 16 20:36:46 2014 -0800

    add TODO notes
---
 mplexporter/renderers/_vincent.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/mplexporter/renderers/_vincent.py b/mplexporter/renderers/_vincent.py
index 1cd9cd5..dad53c1 100644
--- a/mplexporter/renderers/_vincent.py
+++ b/mplexporter/renderers/_vincent.py
@@ -10,16 +10,16 @@ class VincentRenderer(Renderer):
         self.figheight = int(fig.get_figheight() * fig.dpi)
 
     def draw_line(self, data, coordinates, style):
-        import vincent
+        import vincent  # only import if VincentRenderer is used
         if coordinates != 'data':
             warnings.warn("Only data coordinates supported. Skipping this")
         linedata = {'x': data[:, 0],
                     'y': data[:, 1]}
         line = vincent.Line(linedata, iter_idx='x',
                             width=self.figwidth, height=self.figheight)
-        line.scales['color'].range = [style['color']]
 
-        # TODO: set the 
+        # TODO: respect the other style settings
+        line.scales['color'].range = [style['color']]
 
         if self.chart is None:
             self.chart = line
@@ -27,14 +27,17 @@ class VincentRenderer(Renderer):
             warnings.warn("Multiple plot elements not yet supported")
 
     def draw_markers(self, data, coordinates, style):
-        import vincent
+        import vincent  # only import if VincentRenderer is used
         if coordinates != 'data':
             warnings.warn("Only data coordinates supported. Skipping this")
         markerdata = {'x': data[:, 0],
                       'y': data[:, 1]}
         markers = vincent.Scatter(markerdata, iter_idx='x',
                                   width=self.figwidth, height=self.figheight)
+
+        # TODO: respect the other style settings
         markers.scales['color'].range = [style['facecolor']]
+
         if self.chart is None:
             self.chart = markers
         else:

-- 
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