Skip to content
Snippets Groups Projects
Commit 9015b530 authored by Michael DM Dryden's avatar Michael DM Dryden Committed by Michael DM Dryden
Browse files

Experiments: Deal with new scan data more robustly.

parent 6fda800f
1 merge request!12Python 3 Support
......@@ -514,11 +514,19 @@ class PlotBox(object):
line_number -- line number to update
"""
for subplot in Experiment.data:
self.subplots[subplot].lines[line_number].set_xdata(
Experiment.data[subplot][line_number][0])
self.subplots[subplot].lines[line_number].set_ydata(
Experiment.data[subplot][line_number][1])
while True:
try:
self.subplots[subplot].lines[line_number].set_xdata(
Experiment.data[subplot][line_number][0])
self.subplots[subplot].lines[line_number].set_ydata(
Experiment.data[subplot][line_number][1])
except IndexError:
self.addline()
except KeyError:
pass
else:
break
# logger.warning("Tried to set line %s that doesn't exist.", line_number)
def changetype(self, Experiment):
"""Change plot type. Set axis labels and x bounds to those stored
in the Experiment instance. Stores class instance in Experiment.
......
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