Commit f33facce authored by Yori 'AGy' Fournier's avatar Yori 'AGy' Fournier
Browse files

Merge branch '49-make-myaxes-client' of gitlab.aip.de:yfournier/myplotlib into...

Merge branch '49-make-myaxes-client' of gitlab.aip.de:yfournier/myplotlib into 49-make-myaxes-client
parents 17bd3f3e 0037ffb2
......@@ -120,6 +120,36 @@ class Server():
# answer = ('newSyncFigure', None, 'could not create the Figure')
# return(answer)
elif header in ('syncFigFormatRawData'):
try:
(figID,) = eval(str(content))
except:
print(WARN+"The content of syncFigFormatRawData could not be extracted")
print(SPCE+'Received: '+str(content))
print(SPCE+"I expect '(figID,)'")
answer = ('syncFigFormatRawData', None, 'could not extract content')
return(answer)
try:
fig = G_FIGURES[figID]
except:
print(WARN+"Figure ID does not exists.")
print(SPCE+str(figID))
answer = ('syncFigFormatRawData', None, 'Figure ID does not exists.')
try:
fig.formatRawData()
except:
print(WARN+'Could not format the rawdata of the figure.')
answer = ('syncFigFormatRawData', None, 'Could not format the rawdata of the figure.')
datas = []
for ax in fig.get_axes():
datas.append(ax.data)
answer = ('syncFigFormatRawData', datas, '')
else:
print(WARN+"I don't know ths signal, sorry")
answer = ('readData', None, 'signal unknown')
......
Markdown is supported
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