Commit f01081a0 authored by Philipp Gast's avatar Philipp Gast
Browse files

myAxes: Axis can test its rawdata input on itterable or single data file.

parent 1042f173
......@@ -97,7 +97,16 @@ class MyAxes(Axes):
# the plotting function (need to be overwrite from child
def plotting(self):
pass
# FORMATTING ---------------------------------------------------------
def formatRawData(self, rawdata):
pass
def testRawData(self, rawdata): # not to be overwritten
from collections import Iterable
if isinstance(rawdata, Iterable) :
if hasattr(self,"allow_multi_input") :
return(True)
else :
print(SEVR + "The axis can not handle multiple datasets")
return(False)
......@@ -303,7 +303,9 @@ class MyFig(MyFig_base):
if(self.debug):
print(DBUG+" combining ", rawdata ," with ", ax)
ax.formatRawData(rawdata)
status = ax.testRawData(rawdata)
if status :
ax.formatRawData(rawdata)
else:
try:
ax.formatRawData(rawdata)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment