PyFoam.Basics.GeneralPlotTimelines module

Plots a collection of timelines. General superclass for te other implementations

class PyFoam.Basics.GeneralPlotTimelines.GeneralPlotTimelines(timelines, custom, showWindow=True, registry=None)[source]

Bases: object

This class defines the interface for specific implementations of plotting

This class is moedelled after the Gnuplot-class from the Gnuplot-package

__dict__ = dict_proxy({'buildData': <function buildData>, '__module__': 'PyFoam.Basics.GeneralPlotTimelines', 'setTitle': <function setTitle>, '__dict__': <attribute '__dict__' of 'GeneralPlotTimelines' objects>, 'hasTimes': <function hasTimes>, 'redo': <function redo>, 'doHardcopy': <function doHardcopy>, '__init__': <function __init__>, 'actualSetTitle': <function actualSetTitle>, '__weakref__': <attribute '__weakref__' of 'GeneralPlotTimelines' objects>, 'setYLabel2': <function setYLabel2>, 'preparePlot': <function preparePlot>, 'hasData': <function hasData>, 'setYLabel': <function setYLabel>, 'doReplot': <function doReplot>, 'testAlternate': <function testAlternate>, 'getNames': <function getNames>, '__doc__': 'This class defines the interface for specific implementations of plotting\n\n This class is moedelled after the Gnuplot-class from the Gnuplot-package'})
__init__(timelines, custom, showWindow=True, registry=None)[source]
Parameters:
  • timelines (TimeLineCollection) – The timelines object
  • custom – A CustomplotInfo-object. Values in this object usually override the

other options :param showWindow: whether or not to show a window. Doesn’t affect all implementations

__module__ = 'PyFoam.Basics.GeneralPlotTimelines'
__weakref__

list of weak references to the object (if defined)

actualSetTitle(title)[source]

Sets the title

buildData(times, name, title, lastValid)[source]

Build the implementation specific data :param times: The vector of times for which data exists :param name: the name under which the data is stored in the timeline :param title: the title under which this will be displayed :param lastValid: wether the last data entry is valid

doHardcopy(filename, form, termOpts=None)[source]

Write the contents of the plot to disk :param filename: Name of the file without type extension :param form: String describing the format

doReplot()[source]

Replot the whole data

getNames()[source]

Get the names of the data items

hasData()[source]

Check whether there is any plotable data

hasTimes()[source]

Check whether this timeline contains any timesteps

preparePlot()[source]

Prepare the plotting window

redo()[source]

Replot the timelines

setTitle(title)[source]

Sets the title

setYLabel(title)[source]

Sets the label on the first Y-Axis

setYLabel2(title)[source]

Sets the label on the second Y-Axis

testAlternate(name)[source]
class PyFoam.Basics.GeneralPlotTimelines.PlotLinesRegistry[source]

Bases: object

Collects references to GeneralPlotLines objects

__dict__ = dict_proxy({'__module__': 'PyFoam.Basics.GeneralPlotTimelines', 'add': <function add>, '__doc__': 'Collects references to GeneralPlotLines objects', '__dict__': <attribute '__dict__' of 'PlotLinesRegistry' objects>, 'clear': <function clear>, '__weakref__': <attribute '__weakref__' of 'PlotLinesRegistry' objects>, 'prepareForTransfer': <function prepareForTransfer>, '__init__': <function __init__>, 'nr': 1})
__init__()[source]

x.__init__(…) initializes x; see help(type(x)) for signature

__module__ = 'PyFoam.Basics.GeneralPlotTimelines'
__weakref__

list of weak references to the object (if defined)

add(plot)[source]
clear()[source]
nr = 1
prepareForTransfer()[source]

Makes sure that the data about the plots is to be transfered via XMLRPC

PyFoam.Basics.GeneralPlotTimelines.allPlots()[source]