# pdegplot

Plot PDE geometry

## Syntax

``pdegplot(g)``
``pdegplot(g,Name,Value)``
``h = pdegplot(___)``

## Description

example

````pdegplot(g)` plots the geometry of a PDE problem, as described in `g`.```

example

````pdegplot(g,Name,Value)` plots with additional options specified by one or more `Name,Value` pair arguments.```
````h = pdegplot(___)` returns handles to the graphics, using any of the previous syntaxes.```

## Examples

collapse all

Plot the geometry of a region defined by a few simple shapes.

```g = [2 1 1 1 1 1 1 1 1 4 4; -1 -0.6 -0.5 -0.4 -0.5 0.4 0.5 0.6 0.5 -1 0.17; 1 -0.5 -0.4 -0.5 -0.6 0.5 0.6 0.5 0.4 0.17 1; 0 -0.25 -0.35 -0.25 -0.15 -0.25 -0.35 -0.25 -0.15 0 -0.74; 0 -0.35 -0.25 -0.15 -0.25 -0.35 -0.25 -0.15 -0.25 -0.74 0; 0 0 0 0 0 0 0 0 0 1 1; 1 1 1 1 1 1 1 1 1 0 0; 0 -0.5 -0.5 -0.5 -0.5 0.5 0.5 0.5 0.5 0 0; 0 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 -0.25 0 0; 0 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 1 1; 0 0 0 0 0 0 0 0 0 0.75 0.75; 0 0 0 0 0 0 0 0 0 0 0]; pdegplot(g)```

View the vertex labels, edge labels, and the face label. Add space at the top of the plot to see the top edge clearly.

```pdegplot(g,'VertexLabels','on','EdgeLabels','on','FaceLabels','on') ylim([-.8,.1])```

Import a 3-D geometry file. Plot the geometry and turn on face labels. To see the labels on all faces of the geometry, set the transparency to 0.5.

```model = createpde; importGeometry(model,'BracketWithHole.stl'); pdegplot(model,'FaceLabels','on','FaceAlpha',0.5)```

Import a 3-D geometry file. Plot the geometry and turn on cell labels.

```model = createpde; importGeometry(model,'DampingMounts.stl'); pdegplot(model,'CellLabels','on')```

## Input Arguments

collapse all

Geometry description, specified by one of the following:

Data Types: `double` | `char` | `string` | `function_handle`

### Name-Value Pair Arguments

Specify optional comma-separated pairs of `Name,Value` arguments. `Name` is the argument name and `Value` is the corresponding value. `Name` must appear inside quotes. You can specify several name and value pair arguments in any order as `Name1,Value1,...,NameN,ValueN`.

Example: `pdegplot(g,'FaceLabels','on')`

The argument `SubdomainLabels` is not recommended. Use `FaceLabels` for both 2-D and 3-D geometries instead.

Vertex labels for 2-D or 3-D geometry, specified as `'off'` or `'on'`.

Example: `'VertexLabels','on'`

Data Types: `char` | `string`

Boundary edge labels for 2-D or 3-D geometry, specified as `'off'` or `'on'`.

Example: `'EdgeLabels','on'`

Data Types: `char` | `string`

Boundary face labels for 2-D or 3-D geometry, specified as `'off'` or `'on'`.

Example: `'FaceLabels','on'`

Data Types: `char` | `string`

Cell labels for 3-D geometry, specified as `'off'` or `'on'`.

Example: `'CellLabels','on'`

Data Types: `char` | `string`

Surface transparency for 3-D geometry, specified as the comma-separated pair consisting of `'FaceAlpha'` and a real number from `0` through `1`. The default value `1` indicates no transparency. The value `0` indicates complete transparency.

Example: `'FaceAlpha',0.5`

Data Types: `double`

## Output Arguments

collapse all

Handles to graphics objects, returned as a vector.

## Alternative Functionality

### App

If you create 2-D geometry in the PDE Modeler app, you can view the geometry from Boundary Mode. To see the edge labels, select Boundary > Show Edge Labels. To see the face labels, select PDE > Show Subdomain Labels.