PyFoam.Basics.GnuplotFile module

Analyze a file with GNUPLOT-Data

class PyFoam.Basics.GnuplotFile.GnuplotFile(fname)[source]

Bases: object

__dict__ = mappingproxy({'__module__': 'PyFoam.Basics.GnuplotFile', '__init__': <function GnuplotFile.__init__>, 'analyze': <function GnuplotFile.analyze>, 'writePlotFile': <function GnuplotFile.writePlotFile>, '__dict__': <attribute '__dict__' of 'GnuplotFile' objects>, '__weakref__': <attribute '__weakref__' of 'GnuplotFile' objects>, '__doc__': None})
__init__(fname)[source]
Parameters

fname – The filename

__module__ = 'PyFoam.Basics.GnuplotFile'
__weakref__

list of weak references to the object (if defined)

analyze()[source]

Find out how many columns there are and what their names are

There are two cases:

1. the first line is not a comment. In this case the column names are ‘time’ and ‘value0x’ depending on how many values are in the first line

2. the first line is a comment line (it starts with a #). In this case the rest of the line is analyzed and used as names

writePlotFile(name)[source]

Writes a file that can be used by Gnuplot

Parameters

name – name of the file