Skip to content

Plot legend must be unique identifier of scan data #15

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions