The Plot Group Syntax
Result plots always appear in plot groups, which are added to the model by the create method:
model.result.create(<pgtag>, sdim)
Select the string <pgtag> to identify the plot group and the integer sdim to set the space dimension (1, 2, or 3) of the group.
To add a plot to a plot group, use the syntax:
pg.feature.create(<ftag>, plottype)
where pg is a link to a plot group node and plottype is a string that defines the plot type.
Plots can have different attributes that modify the display. For example, the Deformation attribute deforms the plot according to a vector quantity, the Height Expression attribute introduces 3D height on a 2D table surface plot, and the Filter attribute filters the plot using a logical expression. The type of plot determines which attributes are available. Add an attribute to a plot with the command:
pg.feature(<ftag>).feature.create(<attrtag>, attrtype)
where attrtype is a string that defines the attribute type.
For a list of available plot types and corresponding attribute types, see Results and model.result() in the COMSOL Multiphysics Programming Reference Manual or type at the MATLAB prompt: mphdoc(model.result).