Skip to content
Merged
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
13 changes: 11 additions & 2 deletions qcodes/plots/pyqtgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,14 @@ class QtPlot(BasePlot):
rpg = None

def __init__(self, *args, figsize=(1000, 600), interval=0.25,
windowTitle='', theme=((60, 60, 60), 'w'), show_window=True, remote=True, **kwargs):
window_title='', theme=((60, 60, 60), 'w'), show_window=True, remote=True, **kwargs):
super().__init__(interval)

if 'windowTitle' in kwargs.keys():
warnings.warn("windowTitle argument has been changed to window_title. Please update your call to QtPlot")
temp_wt = kwargs.pop('windowTitle')
if not window_title:
window_title = temp_wt
self.theme = theme

if remote:
Expand All @@ -50,7 +55,7 @@ def __init__(self, *args, figsize=(1000, 600), interval=0.25,
else:
# overrule the remote pyqtgraph class
self.rpg = pg
self.win = self.rpg.GraphicsWindow(title=windowTitle)
self.win = self.rpg.GraphicsWindow(title=window_title)
self.win.setBackground(theme[1])
self.win.resize(*figsize)
self.subplots = [self.add_subplot()]
Expand Down Expand Up @@ -408,3 +413,7 @@ def save(self, filename=None):
filename = filename or default
image = self.win.grab()
image.save(filename, "PNG", 0)

def setGeometry(self, x, y, w, h):
""" Set geometry of the plotting window """
self.win.setGeometry(x, y, w, h)