Merged hooke.plugin.plotmanip into hooke.plugin.curve.
[hooke.git] / hooke / plugin / generalvclamp.py
index a6721430167442a5133392b046969f8abaadd433..d15260822d3c4b96e8506df104717199fc31430b 100644 (file)
@@ -39,6 +39,25 @@ warnings.simplefilter('ignore',np.RankWarning)
 
 class generalvclampCommands(object):
 
+    def do_subtplot(self, args):
+        '''
+        SUBTPLOT
+        (procplots.py plugin)
+        Plots the difference between ret and ext current curve
+        -------
+        Syntax: subtplot
+        '''
+        #FIXME: sub_filter and sub_order must be args
+
+        if len(self.plots[0].vectors) != 2:
+            print 'This command only works on a curve with two different plots.'
+            pass
+
+        outplot=self.subtract_curves(sub_order=1)
+
+        plot_graph=self.list_of_events['plot_graph']
+        wx.PostEvent(self.frame,plot_graph(plots=[outplot]))
+
     def _plug_init(self):
         self.basecurrent=None
         self.basepoints=None