fipy.viewers¶
Tools for displaying the values of Variable
objects
Functions
|
Generic function for creating a Viewer. |
Classes
|
Substitute viewer that doesn't do anything |
Exceptions
- class fipy.viewers.DummyViewer(vars, title=None, **kwlimits)¶
Bases:
AbstractViewer
Substitute viewer that doesn’t do anything
Create a AbstractViewer object.
- Parameters:
vars (
CellVariable
orlist
) – the CellVariable objects to display.title (
str
, optional) – displayed at the top of the Viewer windowxmin (
float
, optional) – displayed range of data. Any limit set to a (default) value of None will autoscale.xmax (
float
, optional) – displayed range of data. Any limit set to a (default) value of None will autoscale.ymin (
float
, optional) – displayed range of data. Any limit set to a (default) value of None will autoscale.ymax (
float
, optional) – displayed range of data. Any limit set to a (default) value of None will autoscale.zmin (
float
, optional) – displayed range of data. Any limit set to a (default) value of None will autoscale.zmax (
float
, optional) – displayed range of data. Any limit set to a (default) value of None will autoscale.datamin (
float
, optional) – displayed range of data. Any limit set to a (default) value of None will autoscale.datamax (
float
, optional) – displayed range of data. Any limit set to a (default) value of None will autoscale.
- plot(filename=None)¶
Update the display of the viewed variables.
- Parameters:
filename (
str
) – If not None, the name of a file to save the image into.
- plotMesh(filename=None)¶
Display a representation of the mesh
- Parameters:
filename (
str
) – If not None, the name of a file to save the image into.
- setLimits(limits={}, **kwlimits)¶
Update the limits.
- Parameters:
limits (
dict
, optional) – a (deprecated) alternative to limit keyword argumentsxmin (
float
, optional) – displayed range of data. A 1D Viewer will only use xmin and xmax, a 2D viewer will also use ymin and ymax, and so on. All viewers will use datamin and datamax. Any limit set to a (default) value of None will autoscale.xmax (
float
, optional) – displayed range of data. A 1D Viewer will only use xmin and xmax, a 2D viewer will also use ymin and ymax, and so on. All viewers will use datamin and datamax. Any limit set to a (default) value of None will autoscale.ymin (
float
, optional) – displayed range of data. A 1D Viewer will only use xmin and xmax, a 2D viewer will also use ymin and ymax, and so on. All viewers will use datamin and datamax. Any limit set to a (default) value of None will autoscale.ymax (
float
, optional) – displayed range of data. A 1D Viewer will only use xmin and xmax, a 2D viewer will also use ymin and ymax, and so on. All viewers will use datamin and datamax. Any limit set to a (default) value of None will autoscale.zmin (
float
, optional) – displayed range of data. A 1D Viewer will only use xmin and xmax, a 2D viewer will also use ymin and ymax, and so on. All viewers will use datamin and datamax. Any limit set to a (default) value of None will autoscale.zmax (
float
, optional) – displayed range of data. A 1D Viewer will only use xmin and xmax, a 2D viewer will also use ymin and ymax, and so on. All viewers will use datamin and datamax. Any limit set to a (default) value of None will autoscale.datamin (
float
, optional) – displayed range of data. A 1D Viewer will only use xmin and xmax, a 2D viewer will also use ymin and ymax, and so on. All viewers will use datamin and datamax. Any limit set to a (default) value of None will autoscale.datamax (
float
, optional) – displayed range of data. A 1D Viewer will only use xmin and xmax, a 2D viewer will also use ymin and ymax, and so on. All viewers will use datamin and datamax. Any limit set to a (default) value of None will autoscale.
- exception fipy.viewers.MeshDimensionError¶
Bases:
IndexError
- __cause__¶
exception cause
- __context__¶
exception context
- __delattr__(name, /)¶
Implement delattr(self, name).
- __getattribute__(name, /)¶
Return getattr(self, name).
- __reduce__()¶
Helper for pickle.
- __repr__()¶
Return repr(self).
- __setattr__(name, value, /)¶
Implement setattr(self, name, value).
- __str__()¶
Return str(self).
- add_note()¶
Exception.add_note(note) – add a note to the exception
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- fipy.viewers.Viewer(vars, title=None, limits={}, FIPY_VIEWER=None, **kwlimits)¶
Generic function for creating a Viewer.
The Viewer factory will search the module tree and return an instance of the first Viewer it finds that supports the dimensions of vars. Setting the FIPY_VIEWER environment variable to either matplotlib, mayavi, tsv, or vtk will specify the viewer.
The kwlimits or limits parameters can be used to constrain the view. For example:
Viewer(vars=some1Dvar, xmin=0.5, xmax=None, datamax=3)
or:
Viewer(vars=some1Dvar, limits={'xmin': 0.5, 'xmax': None, 'datamax': 3})
will return a viewer that displays a line plot from an x value of 0.5 up to the largest x value in the dataset. The data values will be truncated at an upper value of 3, but will have no lower limit.
- Parameters:
vars (
CellVariable
orlist
) – the Variable objects to display.title (
str
, optional) – displayed at the top of the Viewer windowlimits (
dict
) – a (deprecated) alternative to limit keyword argumentsFIPY_VIEWER – a specific viewer to attempt (possibly multiple times for multiple variables)
xmin (
float
, optional) – displayed range of data. A 1D Viewer will only use xmin and xmax, a 2D viewer will also use ymin and ymax, and so on. All viewers will use datamin and datamax. Any limit set to a (default) value of None will autoscale.xmax (
float
, optional) – displayed range of data. A 1D Viewer will only use xmin and xmax, a 2D viewer will also use ymin and ymax, and so on. All viewers will use datamin and datamax. Any limit set to a (default) value of None will autoscale.ymin (
float
, optional) – displayed range of data. A 1D Viewer will only use xmin and xmax, a 2D viewer will also use ymin and ymax, and so on. All viewers will use datamin and datamax. Any limit set to a (default) value of None will autoscale.ymax (
float
, optional) – displayed range of data. A 1D Viewer will only use xmin and xmax, a 2D viewer will also use ymin and ymax, and so on. All viewers will use datamin and datamax. Any limit set to a (default) value of None will autoscale.zmin (
float
, optional) – displayed range of data. A 1D Viewer will only use xmin and xmax, a 2D viewer will also use ymin and ymax, and so on. All viewers will use datamin and datamax. Any limit set to a (default) value of None will autoscale.zmax (
float
, optional) – displayed range of data. A 1D Viewer will only use xmin and xmax, a 2D viewer will also use ymin and ymax, and so on. All viewers will use datamin and datamax. Any limit set to a (default) value of None will autoscale.datamin (
float
, optional) – displayed range of data. A 1D Viewer will only use xmin and xmax, a 2D viewer will also use ymin and ymax, and so on. All viewers will use datamin and datamax. Any limit set to a (default) value of None will autoscale.datamax (
float
, optional) – displayed range of data. A 1D Viewer will only use xmin and xmax, a 2D viewer will also use ymin and ymax, and so on. All viewers will use datamin and datamax. Any limit set to a (default) value of None will autoscale.
Modules
Test implementation of the viewers |
|
Interactively test the viewers |
|