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__ = mappingproxy({'__module__': 'PyFoam.Basics.GeneralPlotTimelines', '__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__': <function GeneralPlotTimelines.__init__>, 'get_label_tag': <function GeneralPlotTimelines.get_label_tag>, 'testAlternate': <function GeneralPlotTimelines.testAlternate>, 'getNames': <function GeneralPlotTimelines.getNames>, 'hasTimes': <function GeneralPlotTimelines.hasTimes>, 'hasData': <function GeneralPlotTimelines.hasData>, 'redo': <function GeneralPlotTimelines.redo>, 'buildData': <function GeneralPlotTimelines.buildData>, 'preparePlot': <function GeneralPlotTimelines.preparePlot>, 'doReplot': <function GeneralPlotTimelines.doReplot>, 'addVerticalMarker': <function GeneralPlotTimelines.addVerticalMarker>, 'actualSetTitle': <function GeneralPlotTimelines.actualSetTitle>, 'setTitle': <function GeneralPlotTimelines.setTitle>, 'setYLabel': <function GeneralPlotTimelines.setYLabel>, 'setYLabel2': <function GeneralPlotTimelines.setYLabel2>, 'doHardcopy': <function GeneralPlotTimelines.doHardcopy>, '__dict__': <attribute '__dict__' of 'GeneralPlotTimelines' objects>, '__weakref__': <attribute '__weakref__' of 'GeneralPlotTimelines' objects>})
__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

addVerticalMarker(colorRGB=None, label=None)[source]

Add a vertical line to the graph at the current time. Optionally color it and add a label

buildData(times, name, title, lastValid, tag=None)[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

get_label_tag(name)[source]
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__ = mappingproxy({'__module__': 'PyFoam.Basics.GeneralPlotTimelines', '__doc__': 'Collects references to GeneralPlotLines objects', 'nr': 1, '__init__': <function PlotLinesRegistry.__init__>, 'clear': <function PlotLinesRegistry.clear>, 'add': <function PlotLinesRegistry.add>, 'prepareForTransfer': <function PlotLinesRegistry.prepareForTransfer>, '__dict__': <attribute '__dict__' of 'PlotLinesRegistry' objects>, '__weakref__': <attribute '__weakref__' of 'PlotLinesRegistry' objects>})
__init__()[source]

Initialize self. See help(type(self)) for accurate 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]