Update
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
if get_exec_pars().args:
|
||||
filename=get_exec_pars().args[0]
|
||||
else:
|
||||
#Debugging
|
||||
filename = "2021_03/20210323/20210228_023905_eiger.h5"
|
||||
|
||||
pname = filename.split('_')
|
||||
pname = pname[2]
|
||||
|
||||
## load data from file
|
||||
try:
|
||||
title = load_data("plot/title", root=filename)
|
||||
xlabel = load_data("plot/xlabel", root=filename)
|
||||
ylabel = load_data("plot/ylabel", root=filename)
|
||||
x = load_data("plot/x", root=filename)
|
||||
y = load_data("plot/y", root=filename)
|
||||
y_desc = load_data("plot/y_desc", root=filename)
|
||||
except:
|
||||
err = "Invalid pink file"
|
||||
print err
|
||||
raise Exception(err)
|
||||
|
||||
p1h=plot(None, y_desc[0], title=pname)
|
||||
p1 = p1h.get(0)
|
||||
p1.setTitle(title)
|
||||
p1.getAxis(p1.AxisId.X).setLabel(xlabel)
|
||||
p1.getAxis(p1.AxisId.Y).setLabel(ylabel)
|
||||
|
||||
for i in range(len(y)):
|
||||
if i>0:
|
||||
p1.addSeries(LinePlotSeries(y_desc[i]))
|
||||
p1.getSeries(i).setData(x, y[i])
|
||||
|
||||
#if len(y)>1:
|
||||
p1.setLegendVisible(True)
|
||||
|
||||
Reference in New Issue
Block a user