PDEVisualization Properties
PDEVisualization
properties control the appearance and behavior
of a PDEVisualization
object. By changing property values, you can modify
certain aspects of the visualization.
Create a PDEVisualization
object using the pdeviz
function.
Displayed Data
MeshData
— Finite element mesh
FEMesh
object
Finite element mesh, specified as an FEMesh
object.
NodalData
— Data at mesh nodes
vector
Data at mesh nodes, specified as a vector.
Data Types: double
DeformationData
— Mesh deformation data
FEStruct
object | matrix | structure array
Mesh deformation data, specified as one of the following:
An
FEStruct
object with the propertiesux
,uy
, and, for a 3-D geometry,uz
A structure array with the fields
ux
,uy
, and, for a 3-D geometry,uz
A matrix with either two columns for a 2-D geometry or three columns for a 3-D geometry
Data Types: double
DeformationScaleFactor
— Level of mesh deformation
nonnegative number
Level of mesh deformation, specified as a nonnegative number.
The toolbox computes the default value of DeformationScaleFactor
based on the mesh and the value of DeformationData
.
Example: v.DeformationScaleFactor = 1000;
Data Types: double
XLimits
, YLimits
, ZLimits
— Axis limits
two-element vector of the form [min max]
Axis limits, specified as a two-element vector of the form [min
max]
, where max
is greater than min
.
You can specify the limits as numeric, categorical, datetime, or duration values. The
type of values that you specify must match the type of values along the axis.
You can specify both limits or you can specify one limit and let the axes
automatically calculate the other. For an automatically calculated minimum or maximum
limit, use -Inf
or Inf
, respectively.
Example: ax.XLim = [0 10]
Example: ax.YLim = [-Inf 10]
Example: ax.ZLim = [0 Inf]
Color and Styling
ColorLimits
— Color limits
two-element vector
Color limits, specified as a two-element vector of the form [min
max]
. The color limits indicate the color data values that map to the first
and last colors in the colormap.
Example: v.ColorLimits = [0 10];
ColorbarVisible
— Colorbar visibility
'on'
(default) | on/off logical value
Colorbar visibility, specified as 'on'
or
'off'
, or as numeric or logical 1
(true
) or 0
(false
). A value
of 'on'
is equivalent to true
, and
'off'
is equivalent to false
. Thus, you can use
the value of this property as a logical value. The value is stored as an on/off logical
value of type matlab.lang.OnOffSwitchState
.
Example: v.ColorbarVisible = 'off';
MeshVisible
— Mesh visibility
'on'
| 'off'
| on/off logical value
Mesh visibility, specified as 'on'
or 'off'
,
or as numeric or logical 1
(true
) or
0
(false
). A value of 'on'
is
equivalent to true
, and 'off'
is equivalent to
false
. Thus, you can use the value of this property as a logical
value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState
.
Example: v.MeshVisible = 'on';
Data Types: char
| string
Transparency
— Surface transparency
1
(default) | real number from 0
through 1
Surface transparency, specified as a real number from 0
through
1
. The default value 1
indicates no
transparency. The value 0
indicates complete transparency.
When you use the Transparency
argument for solution plots, the
plot colors might not match the color bar values. Always use a fully opaque plot to
estimate the solution values.
Data Types: double
AxesVisible
— Toggle to hide or show axes
'on'
(default) | 'off'
| on/off logical value
Toggle to hide or show axes, specified as 'on'
or
'off'
, or as numeric or logical 1
(true
) or 0
(false
). A value
of 'on'
is equivalent to true
, and
'off'
is equivalent to false
. Thus, you can use
the value of this argument as a logical value.
AxesColor
— Background color
RGB triplet | hexadecimal color code | 'r'
| 'g'
| 'b'
Background color, specified as an RGB triplet, a hexadecimal color code, a color name, or a short name.
Labels
XLabel
, YLabel
, ZLabel
— Text object for axis label
character vector | cell array of character vectors | string array | categorical array
Axis labels, specified as character vectors, cell arrays of character vectors, string arrays, or categorical arrays.
Example: v.XLabel = 'time';
Title
— Chart title
character vector | cell array of character vectors | string array | categorical array
Chart title, specified as a character vector, cell array of character vectors, string array, or categorical array.
Example: v.Title = 'My Title Text';
To create a multi-line title, specify a cell array of character vectors or a string array. Each element in the array corresponds to a line of text.
Example: v.Title = {'My','Title'};
If you specify the title as a categorical array, MATLAB® uses the values in the array, not the categories.
If you create the chart using tabular data, the default chart has an autogenerated
title. If you do not want a title, specify ''
.
Interactivity
Visible
— State of visibility
'on'
(default) | on/off logical value
State of visibility, specified as 'on'
or
'off'
, or as numeric or logical 1
(true
) or 0
(false
). A value
of 'on'
is equivalent to true
, and
'off'
is equivalent to false
. Thus, you can use
the value of this property as a logical value. The value is stored as an on/off logical
value of type matlab.lang.OnOffSwitchState
.
'on'
— Display the chart.'off'
— Hide the chart without deleting it. You still can access the properties of chart when it is not visible.
Parent/Child
Parent
— Parent container
Figure
object (default) | Panel
object | Tab
object | TiledChartLayout
object
Parent container of the chart, specified as a Figure
,
Panel
, Tab
, or
TiledChartLayout
object.
HandleVisibility
— Visibility of object handle
'on'
(default) | 'off'
| 'callback'
Visibility of the object handle in the Children
property of the
parent, specified as one of these values:
'on'
— Object handle is always visible.'off'
— Object handle is invisible at all times. This option is useful for preventing unintended changes by another function. Set theHandleVisibility
to'off'
to temporarily hide the handle during the execution of that function.'callback'
— Object handle is visible from within callbacks or functions invoked by callbacks, but not from within functions invoked from the command line. This option blocks access to the object at the command line, but permits callback functions to access it.
If the object is not listed in the Children
property of the
parent, then functions that obtain object handles by searching the object hierarchy or
querying handle properties cannot return it. Examples of such functions include the
get
, findobj
, gca
, gcf
, gco
, cla
, clf
, and close
functions.
Hidden object handles are still valid. Set the root
ShowHiddenHandles
property to 'on'
to list all
object handles regardless of their HandleVisibility
property
setting.
Position
OuterPosition
— Chart size and location, including margins
[left bottom width height]
Chart size and location, including the margins for decorations such as axis labels
and tick marks. Specify this property as a vector of form [left bottom width
height]
. The values are in the units specified by the
Units
property.
left
— Distance from the left edge of the parent container to the outer-left edge of the chart that includes the margins. Typically, the parent container is a figure, panel, or tab.bottom
— Distance from the bottom edge of the parent container to the outer-bottom edge of the chart that includes the margins.width
— Width of chart, including the margins.height
— Height of chart, including the margins.
Note
Setting this property has no effect when the parent of the chart is a
TiledChartLayout
.
InnerPosition
— Chart size and location, excluding margins
[left bottom width height]
Chart size and location, excluding the margins for decorations such as axis labels
and tick marks. Specify this property as a vector of form [left bottom width
height]
. The values are in the units specified by the
Units
property.
left
— Distance from the left edge of the parent container to the inner-left edge of the chart that excludes the margins. Typically, the parent container is a figure, panel, or tab.bottom
— Distance from the bottom edge of the parent container to the inner-bottom edge of the chart that excludes the margins.width
— Width of chart, excluding the margins.height
— Height of chart, excluding the margins.
Note
Setting this property has no effect when the parent of the chart is a
TiledChartLayout
.
Position
— Chart size and location, excluding margins
[left bottom width height]
Chart size and location, excluding the margins for decorations such as axis labels
and tick marks. Specify this property as a vector of form [left bottom width
height]
. This property is equivalent to the
InnerPosition
property.
Note
Setting this property has no effect when the parent of the chart is a
TiledChartLayout
.
PositionConstraint
— Position to hold constant
'outerposition'
| 'innerposition'
Position property to hold constant when adding, removing, or changing decorations, specified as one of the following values:
'outerposition'
— TheOuterPosition
property remains constant when you add, remove, or change decorations such as a title or an axis label. If any positional adjustments are needed, MATLAB adjusts theInnerPosition
property.'innerposition'
— TheInnerPosition
property remains constant when you add, remove, or change decorations such as a title or an axis label. If any positional adjustments are needed, MATLAB adjusts theOuterPosition
property.
Note
Setting this property has no effect when the parent container is a
TiledChartLayout
.
Units
— Position units
'normalized'
(default) | 'inches'
| 'centimeters'
| 'characters'
| 'points'
| 'pixels'
Position units, specified as a value from the following table. To change the
position of the chart in specific units, set the Units
property
before specifying the Position
property. If you specify the
Units
and Position
properties in a single
command (using name-value pairs), be sure to specify Units
before
Position
.
Units | Description |
---|---|
'normalized' (default) | Normalized with respect to the parent container, which is typically the
figure, panel, or tab. The lower left corner of the container maps to
(0,0) , and the upper right corner maps to
(1,1) . |
'inches' | Inches. |
'centimeters' | Centimeters. |
'characters' | Based on the default font of the graphics root object:
|
'points' | Typography points. One point equals 1/72 inch. |
'pixels' | Distances in pixels are independent of your system resolution on Windows® and Macintosh systems:
On Linux® systems, the size of a pixel is determined by your system resolution. |
Layout
— Layout options
empty LayoutOptions
array (default) | TiledChartLayoutOptions
Layout options, specified as a TiledChartLayoutOptions
object.
This property specifies options when an instance of your chart is a child of a tiled
chart layout. If the instance is not a child of a tiled chart layout (for example, it is
a child of a figure or panel), then this property is empty and has no effect. Otherwise,
you can position the chart within the layout by setting the Tile
and TileSpan
properties on the
TiledChartLayoutOptions
object.
For example, this code places chart object c
into the third tile
of a tiled chart
layout.
c.Layout.Tile = 3;
To make the chart span multiple tiles, specify the TileSpan
property as a two-element vector. For example, this chart spans 2
rows and 3
columns of
tiles.
c.Layout.TileSpan = [2 3];
Note
Tiled chart layouts are not supported for the axes returned by the getAxes
method. Instead, you can place an instance of your chart into a tiled chart
layout.
View
View
— Azimuth and elevation of view
[0 90]
(default) | two-element vector of the form [azimuth elevation]
Azimuth and elevation of view, specified as a two-element vector of the form
[azimuth elevation]
defined in degree units. Alternatively, use the
view
function to set the view.
Version History
Introduced in R2021a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)