plot

dolfin.common.plotting.plot(object, *args, **kwargs)

Plot given object.

Arguments
object
a Mesh, a MeshFunction, a Function, a Expression <dolfin.cpp.Expression>, a DirichletBC <dolfin.cpp.DirichletBC> or a FiniteElement.
Examples of usage

In the simplest case, to plot only e.g. a mesh, simply use

mesh = UnitSquare(4,4)
plot(mesh)

Use the title argument to specify title of the plot

plot(mesh, tite="Finite element mesh")

It is also possible to plot an element

element = FiniteElement("BDM", tetrahedron, 3)
plot(element)

Vector valued functions can be visualized with an alternative mode

plot(u, mode = "glyphs")

A more advanced example

plot(u,
     wireframe = True,              # use wireframe rendering
     interactive = False,           # do not hold plot on screen
     scalarbar = False,             # hide the color mapping bar
     hardcopy_prefix = "myplot",    # default plotfile name
     scale = 2.0                    # scale the warping/glyphs
     title = "Fancy plot"           # Set your own title
     )