The 'legend' used by the ScanWindow must be a unique key for each plotted curve. It is expected (although perhaps not enforced?) that the legend should include the source name and scan key. ScanWindow will make a copy of the DataObject it receives and append the y channel name (i.e., the data_key for a BlueskyRun).
|
legend = sel['legend'] # expected form sourcename + scan key |
|
if type(sel['selection']) == type({}): |
|
if 'y' in sel['selection']: |
|
for lName in ['cntlist', 'LabelNames']: |
|
if lName in sel['selection']: |
|
for index in sel['selection']['y']: |
|
removelist.append(legend +" "+\ |
|
sel['selection'][lName][index]) |
|
self.dataObjectsDict[newDataObject.info['legend']] = newDataObject |
|
self.addCurve(xdata, ydata, legend=newDataObject.info['legend'], |
|
info=newDataObject.info, |
|
symbol=symbol, |
|
yaxis=yaxis, |
|
xlabel=xlabel, |
|
ylabel=ylabel, |
|
replot=False) |
|
if ('operations' in dataObject.info) and len(dataObject.y) == 1: |
|
newDataObject.info['legend'] = legend |
|
symbol = 'x' |
|
else: |
|
symbol = None |
|
newDataObject.info['legend'] = legend + " " + ylegend |
|
newDataObject.info['selectionlegend'] = legend |
The 'legend' used by the
ScanWindowmust be a unique key for each plotted curve. It is expected (although perhaps not enforced?) that the legend should include the source name and scan key.ScanWindowwill make a copy of theDataObjectit receives and append theychannel name (i.e., thedata_keyfor aBlueskyRun).pymca/PyMca5/PyMcaGui/pymca/ScanWindow.py
Lines 481 to 488 in 97df07e
pymca/PyMca5/PyMcaGui/pymca/ScanWindow.py
Lines 438 to 445 in 97df07e
pymca/PyMca5/PyMcaGui/pymca/ScanWindow.py
Lines 424 to 430 in 97df07e