Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plot legend must be unique identifier of scan data #15

Open
padraic-shafer opened this issue Sep 24, 2024 · 0 comments
Open

Plot legend must be unique identifier of scan data #15

padraic-shafer opened this issue Sep 24, 2024 · 0 comments

Comments

@padraic-shafer
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant