plot_add_feature
Add a plot feature or attribute, such as Surface, Slice, or Arrow, to an existing plot group, with optional expression and color settings.
Instructions
Add a plot feature (or an attribute) to a plot group.
Args:
plotgroup: target plot group tag (see plot_list).
feature_type: COMSOL plot type, e.g. Surface, Volume,
Slice, Isosurface, Contour, ArrowSurface,
ArrowVolume, ArrowLine, Streamline, Line,
Point, Mesh, LineGraph, PointGraph, Global.
Attributes Deform/Height/Filter/Transparency
require parent. See plot_types.
tag: feature tag (auto e.g. surf1 when omitted).
parent: plot feature tag when adding an attribute (e.g. "surf1"),
or a nested path for deeper nodes ("surf1/def1").
expr: expression to plot. Scalar e.g. "T", "ht.T", or
vector components comma-separated "ht.dfluxx,ht.dfluxy,ht.dfluxz".
Arbitrary COMSOL expressions incl. units might work, e.g.
"T-293.15[K]".
properties: extras such as colortable ("Rainbow",
"ThermalLight"), colorlegend (on/off), unit,
rangecoloractive/rangecolormin/rangecolormax,
smooth, title. Values may be strings or numbers.
label: display label for the feature.
model: model name/tag (None = current model).
Example: plot_add_feature("pgT", "Surface", expr="T", properties={"colortable": "ThermalLight"})
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"plotgroup": "<plotgroup>",
"feature_type": "<feature_type>"
},
"name": "plot_add_feature"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | ||
| expr | No | ||
| label | No | ||
| model | No | ||
| parent | No | ||
| plotgroup | Yes | ||
| properties | No | ||
| feature_type | Yes |