[hdf-compass] 75/295: fix title for plot

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Sun May 8 10:35:28 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/master
in repository hdf-compass.

commit 4e7c39780b4b0aab3df9899208ea6c6074733e05
Author: jreadey <jreadey at hdfgroup.org>
Date:   Thu May 7 19:59:34 2015 -0700

    fix title for plot
---
 compass_viewer/array/plot.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/compass_viewer/array/plot.py b/compass_viewer/array/plot.py
index ab84839..caabba7 100644
--- a/compass_viewer/array/plot.py
+++ b/compass_viewer/array/plot.py
@@ -33,11 +33,12 @@ class PlotFrame(BaseFrame):
     Override draw_figure() to plot your figure on the provided axes.
     """
 
-    def __init__(self, data):
+    def __init__(self, data, title="a title"):
         """ Create a new Matplotlib plotting window for a 1D line plot
         """
 
-        BaseFrame.__init__(self, id=wx.ID_ANY, title="Line plot", size=(800,400))
+        print self.__class__.__name__
+        BaseFrame.__init__(self, id=wx.ID_ANY, title=title, size=(800,400))
         
         self.data = data
 
@@ -65,9 +66,9 @@ class PlotFrame(BaseFrame):
 
 class LinePlotFrame(PlotFrame):
 
-    def __init__(self, data, names=None):
+    def __init__(self, data, names=None, title="Line Plot"):
         self.names = names
-        PlotFrame.__init__(self, data)
+        PlotFrame.__init__(self, data, title)
 
 
     def draw_figure(self):
@@ -80,6 +81,9 @@ class LinePlotFrame(PlotFrame):
 
 class ContourPlotFrame(PlotFrame):
 
+    def __init__(self, data, names=None, title="Contour Plot"):
+        PlotFrame.__init__(self, data, title)
+        
     def draw_figure(self):
         import pylab
         xx = np.arange(self.data.shape[1])

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/hdf-compass.git



More information about the debian-science-commits mailing list