The basicframe module
A basic, standalone, single-graph frame for displaying data.
Classes
StandardGraphManager
-
class src.gui.graphing.basicframe.StandardGraphManager(parentFrame)[source]
A class for sending data from experiments to GUI panels.
Parameters : | parentFrame : wx.Window
The frame which will be used as the parent for the GraphFrame objects
spawned by this manager.
|
Methods
-
abort(timeout=10)[source]
Abort the update threads.
-
getGraphs()[source]
Return the figures from the graphing panels.
-
saveGraphs(filename)[source]
Save the graphs to a file.
Resize all graphs to the appropriate size. Then arrange them into a
grid and save that grid to the file specified by filename.
Parameters : | filename : str
A string pointing to which the graph images should be saved. Note
that all graphs go to the same file. filename should be a
complete path name, including an extension.
|
-
setGraphs(graphs)[source]
Set the graphs which will be managed.
Parameters : | graphs : list of Graph
The Graph objects which will send their data to the frames
managed by this object.
|
-
start()[source]
Start the update threads.
GraphThread
-
class src.gui.graphing.basicframe.GraphThread(parentFrame, dataQueue, columns)[source]
A thread to update a particular graph at regular intervals.
Parameters : | parentFrame : wx.Window
The frame or panel which will contain the Frame managed by this thread.
dataQueue : Queue
The Queue object which will move data from the Graph object to the
GraphFrame associated with this thread (and, therefore, to the
GraphPanel.
columns : 2-tuple of str
Strings representing the column names which provide the x- and y-values
for the graph. These strings will label the axes in the GraphPanel.
|
Methods
GraphFrame
-
class src.gui.graphing.basicframe.GraphFrame(parent, dataQueue, thread, columns)[source]
A frame for containing a single graph.
Parameters : | parent : Frame
This frame’s parent (so that if the parent is closed, this will also
be closed).
dataQueue : Queue
The Queue.Queue object which will be passed to the panel for
transferring data from the Graph.
thread : Thread
The threading.Thread object in which the graph will run.
columns : iterable
A list or tuple containing the names of the columns relevent to this
graph. In order, they are the x-column, the y-column, and the column
which triggers new plots.
|
Methods