Partial Differential Equation Toolbox | ![]() ![]() |
Generic PDE Toolbox plot function
Syntax
Description
pdeplot(p,e,t,p1,v1,...)
is the generic PDE Toolbox plot function. It can display several functions of a PDE solution at the same time.
The geometry of the PDE problem is given by the mesh data p
, e
, and t
. For details on the mesh data representation, see initmesh
.
Valid property/value pairs include the following.
The pdeplot
is used both from inside the pdetool
GUI and from the command line. It is able to display three entities simultaneously. xydata
can be visualized by a surface plot. Either flat or interpolated (default) shading can be used for the surface plots. A contour plot can be superimposed on the surface plot (in black) or plotted independently (in colors) by setting contour
to on
. zdata
is visualized by displaying height. The triangles can be either tilted by interpolation (default) or flat. Flow data can be visualized by plotting arrows like the MATLAB quiver
plot. All data types can be either node data or triangle data (flow data can only be triangle data). Node data is represented by a column vector of length size(p,2)
and triangle data is represented by a row vector of length size(t,2)
. If no xydata
, zdata
, or flowdata
is supplied, pdeplot
plots the mesh specified by p
, e
, and t
.
The option mesh
displays or hides (default) the triangle mesh in the plot. The option xygrid
first converts the data to x-y data (using tri2grid
), and then uses a standard MATLAB plotting algorithm. The property gridparam
passes the tri2grid
data to pdeplot
. This speeds up animation (see pdedemo5
and pdedemo6
). The property colormap
renders the plot using any MATLAB colormap or color matrix. colorbar
adds a colorbar to the plot. title
inserts a title into the plot. levels
only applies to contour plots: Given a scalar integer value, it plots that number of equally spaced contour levels; given a vector of level values, it plots those contour lines on the levels in the vector.
h=pdeplot(p,t,u)
additionally returns handles to the drawn axes objects.
Examples
The command sequence below plots the solution to Poisson's equation on the L-shaped membrane in 3-D.
[p,e,t]=initmesh('lshapeg'); u=assempde('lshapeb',p,e,t,1,0,1); pdeplot(p,e,t,'xydata',u,'zdata',u,'mesh','off');
See Also
pdecont
, pdegplot
, pdemesh
, pdesurf
![]() | pdenonlin | pdepoly | ![]() |