This page contains the gnuplotViewer Package documentation.
Generic function for creating a GnuplotViewer.
The GnuplotViewer factory will search the module tree and return an instance of the first GnuplotViewer it finds of the correct dimension.
Parameters : |
|
---|
Bases: fipy.viewers.gnuplotViewer.gnuplotViewer._GnuplotViewer
Displays a y vs. x plot of one or more 1D CellVariable objects.
The Gnuplot1DViewer plots a 1D CellVariable using a front end python wrapper available to download (Gnuplot.py).
>>> from fipy import *
>>> mesh = Grid1D(nx=100)
>>> x, = mesh.getCellCenters()
>>> xVar = CellVariable(mesh=mesh, name="x", value=x)
>>> k = Variable(name="k", value=0.)
>>> viewer = Gnuplot1DViewer(vars=(sin(k * xVar), cos(k * xVar / pi)),
... limits={'xmin': 10, 'xmax': 90},
... datamin=-0.9, datamax=2.0,
... title="Gnuplot1DViewer test")
>>> for kval in numerix.arange(0,0.3,0.03):
... k.setValue(kval)
... viewer.plot()
>>> viewer._promptForOpinion()
Different style script demos are available at the Gnuplot site.
Note
Gnuplot1DViewer requires Gnuplot version 4.0.
The _GnuplotViewer should not be called directly only Gnuplot1DViewer and Gnuplot2DViewer should be called.
Parameters : |
|
---|
Bases: fipy.viewers.gnuplotViewer.gnuplotViewer._GnuplotViewer
Displays a contour plot of a 2D CellVariable object.
The Gnuplot2DViewer plots a 2D CellVariable using a front end python wrapper available to download (Gnuplot.py).
>>> from fipy import *
>>> mesh = Grid2D(nx=50, ny=100, dx=0.1, dy=0.01)
>>> x, y = mesh.getCellCenters()
>>> xyVar = CellVariable(mesh=mesh, name="x y", value=x * y)
>>> k = Variable(name="k", value=0.)
>>> viewer = Gnuplot2DViewer(vars=sin(k * xyVar),
... limits={'ymin': 0.1, 'ymax': 0.9},
... datamin=-0.9, datamax=2.0,
... title="Gnuplot2DViewer test")
>>> for kval in range(10):
... k.setValue(kval)
... viewer.plot()
>>> viewer._promptForOpinion()
>>> from fipy import *
>>> mesh = (Grid2D(nx=5, ny=10, dx=0.1, dy=0.1)
... + (Tri2D(nx=5, ny=5, dx=0.1, dy=0.1)
... + ((0.5,), (0.2,))))
>>> x, y = mesh.getCellCenters()
>>> xyVar = CellVariable(mesh=mesh, name="x y", value=x * y)
>>> k = Variable(name="k", value=0.)
>>> viewer = Gnuplot2DViewer(vars=sin(k * xyVar),
... limits={'ymin': 0.1, 'ymax': 0.9},
... datamin=-0.9, datamax=2.0,
... title="Gnuplot2DViewer test")
>>> for kval in range(10):
... k.setValue(kval)
... viewer.plot()
>>> viewer._promptForOpinion()
Different style script demos are available at the Gnuplot site.
Note
Gnuplot2DViewer requires Gnuplot version 4.0.
Creates a Gnuplot2DViewer.
Parameters : |
|
---|
Bases: fipy.viewers.gnuplotViewer.gnuplotViewer._GnuplotViewer
Displays a y vs. x plot of one or more 1D CellVariable objects.
The Gnuplot1DViewer plots a 1D CellVariable using a front end python wrapper available to download (Gnuplot.py).
>>> from fipy import *
>>> mesh = Grid1D(nx=100)
>>> x, = mesh.getCellCenters()
>>> xVar = CellVariable(mesh=mesh, name="x", value=x)
>>> k = Variable(name="k", value=0.)
>>> viewer = Gnuplot1DViewer(vars=(sin(k * xVar), cos(k * xVar / pi)),
... limits={'xmin': 10, 'xmax': 90},
... datamin=-0.9, datamax=2.0,
... title="Gnuplot1DViewer test")
>>> for kval in numerix.arange(0,0.3,0.03):
... k.setValue(kval)
... viewer.plot()
>>> viewer._promptForOpinion()
Different style script demos are available at the Gnuplot site.
Note
Gnuplot1DViewer requires Gnuplot version 4.0.
The _GnuplotViewer should not be called directly only Gnuplot1DViewer and Gnuplot2DViewer should be called.
Parameters : |
|
---|
Bases: fipy.viewers.gnuplotViewer.gnuplotViewer._GnuplotViewer
Displays a contour plot of a 2D CellVariable object.
The Gnuplot2DViewer plots a 2D CellVariable using a front end python wrapper available to download (Gnuplot.py).
>>> from fipy import *
>>> mesh = Grid2D(nx=50, ny=100, dx=0.1, dy=0.01)
>>> x, y = mesh.getCellCenters()
>>> xyVar = CellVariable(mesh=mesh, name="x y", value=x * y)
>>> k = Variable(name="k", value=0.)
>>> viewer = Gnuplot2DViewer(vars=sin(k * xyVar),
... limits={'ymin': 0.1, 'ymax': 0.9},
... datamin=-0.9, datamax=2.0,
... title="Gnuplot2DViewer test")
>>> for kval in range(10):
... k.setValue(kval)
... viewer.plot()
>>> viewer._promptForOpinion()
>>> from fipy import *
>>> mesh = (Grid2D(nx=5, ny=10, dx=0.1, dy=0.1)
... + (Tri2D(nx=5, ny=5, dx=0.1, dy=0.1)
... + ((0.5,), (0.2,))))
>>> x, y = mesh.getCellCenters()
>>> xyVar = CellVariable(mesh=mesh, name="x y", value=x * y)
>>> k = Variable(name="k", value=0.)
>>> viewer = Gnuplot2DViewer(vars=sin(k * xyVar),
... limits={'ymin': 0.1, 'ymax': 0.9},
... datamin=-0.9, datamax=2.0,
... title="Gnuplot2DViewer test")
>>> for kval in range(10):
... k.setValue(kval)
... viewer.plot()
>>> viewer._promptForOpinion()
Different style script demos are available at the Gnuplot site.
Note
Gnuplot2DViewer requires Gnuplot version 4.0.
Creates a Gnuplot2DViewer.
Parameters : |
|
---|