Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions qcodes/plots/pyqtgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@


class QtPlot(BasePlot):

"""
Plot x/y lines or x/y/z heatmap data. The first trace may be included
in the constructor, other traces can be added with QtPlot.add().
Expand Down Expand Up @@ -344,8 +345,8 @@ def _update_labels(self, subplot_object, config):
# pyqtgraph doesn't seem able to get labels, only set
# so we'll store it in the axis object and hope the user
# doesn't set it separately before adding all traces
if axletter+'label' in config and not ax._qcodes_label:
label = config[axletter+'label']
if axletter + 'label' in config and not ax._qcodes_label:
label = config[axletter + 'label']
ax._qcodes_label = label
ax.setLabel(label)
if axletter in config and not ax._qcodes_label:
Expand All @@ -361,7 +362,10 @@ def update_plot(self):
if 'z' in config:
self._update_image(plot_object, config)
else:
plot_object.setData(*self._line_data(config['x'], config['y']))
canplot = np.isfinite(config['x']).any()
if canplot:
plot_object.setData(
*self._line_data(config['x'], config['y']))

def _clean_array(self, array):
"""
Expand Down