Line
Create a line plot.
Syntax
model.result(<pgtag>).create(<ftag>,"Line");
model.result(<pgtag>).feature(<ftag>).set(property, <value>);
model.result(<pgtag>).feature(<ftag>).run();
Description
model.result(<pgtag>).create(<ftag>,"Line") creates a line plot feature named <ftag> belonging to the plot group <pgtag>.
Line plots display a quantity on lines, curves and edges in 2D or 3D.
The following properties are available:
custom | black | blue | cyan | gray | green | magenta | red | white | yellow
custom | black | blue | cyan | gray | green | magenta | red | white | yellow
colortable | uniform | gradient
on | off
Whether to show color legend, when coloring is set to colortable.
linear | linearsymmetric | logarithmic
The color table to use when coloring is set to colortable. See Color Tables for a list of color tables.
none | reverse | nonlinear | nonlinearsymmetric
Transformation of the color table, when coloring is set to colortable or gradient.
{1,0,0} or last used color
The uniform color to use. Active when bottomcolor is set to custom.
{1,0,0} or last used color
{1,0,0} or last used color
The uniform color to use. Active when topcolor is set to custom.
none | parent | dataset name
The description of the expression in expr. Is used in the automatic title.
on | off
on | off
linpoint | harmonic | lintotal | lintotalavg | lintotalrms | lintotalpeak
on | off
If inheritplot is not none: Determines if the color is inherited.
If inheritplot is not none: Determines if the deformation scale is inherited.
none | plot name
If inheritplot is not none: Determines if the color and data ranges are inherited.
If inheritplot is not none: Determines if the transparency settings are inherited.
If inheritplot is not none and linetype is tube: Determines if the tube scale is inherited.
Time corresponding to last selected solnum for transient levels
The time to use, for transient levels. Available when data is not parent and the underlying data is transient.
line | tube
The index of the solution to use, per level, or interp, but only for transient solutions. Available when data is not parent and the underlying data has multiple solutions.
on | off
Whether to reverse to color table or gradient when coloring is set to colortable or gradient and colortabletrans is set to nonlinear or nonlinearsymmetric.
on | off
Whether to use the manual color range specified in rangecolormin and rangecolormax. The color range specifies the minimum and maxim value in the plotted colors. Default is the minimum and maximum data values.
on | off
Whether to use the manual data range specified in rangedatamin and rangedatamax. Values outside the data range is not plotted.
off | pprint | ppr
The element refinement to use, if resolution is set to manual. Bear in mind that this is the refinement used for the base dataset, so the number of elements in the model can increase radically if the plot uses, for example, a revolve dataset.
norefine | coarse | normal | fine | finer | extrafine | custom
none | material | internal | everywhere | expression
Smoothing settings. With material, smoothing is done inside domains with the same material. With internal, smoothing is done inside geometry domains. With expression, the smoothing is based on the expression in smoothexpr.
The expression to use for smoothing when smooth is set to expression.
The index of the solution to use. Available when data is not parent and the underlying data has multiple solutions.
solnum | solutioninfo
manual | parent
If data is a local dataset with nontrivial data, specify solutions manually or take them from the parent plot group.
The time to use, for transient problems. Available when data is not parent and the underlying data is transient.
manual | none
Threshold value (0–1), if threshold is set to manual.
on | off
on if t is used to determine time steps; off if solnum is used.
The title to use when titletype is manual.
auto | custom | label | manual | none
auto, if the title should be computed automatically. custom, if the title should be computed automatically, but customized. label, if the title should be the plot group’s label. manual, if the manual title should be used (the title property). none, if no title should be displayed.
custom | black | blue | cyan | gray | green | magenta | red | white | yellow
true | false
on | off
The unit to use for the expression in expr. If the old unit is not valid when the expression changes, the unit property is reset to default.
on | off
on | off
Attributes
Deform; Filter (Plot Attribute), Height, AberrationHeight, HistogramHeight, TableHeight (2D only); Marker, MaterialAppearance; Selection (Dataset Attribute); Translation; Transparency (3D only)
Examples
Line plot on 2D solution:
Code for Use with Java
DatasetFeature ds = model.result().dataset().create("dset1", "Solution");
ds.set("solution", "sol1");
ResultFeature pg = model.result().create("pg1",2);
pg.set("data","dset1");
pg.create("line1","Line");
pg.feature("line1").set("expr", "3*u");
Code for Use with MATLAB
ds = model.result.dataset.create('dset1', 'Solution');
ds.set('solution', 'sol1');
pg = model.result.create('pg1',2);
pg.set('data','dset1');
pg.create('line1','Line');
pg.feature('line1').set('expr', '3*u');
Line plot on cut plane in 3D, using the Thermal color table:
Code for Use with Java
DatasetFeature ds2 = model.result().dataset().create("cp1", "CutPlane");
ds2.set("data", "dset2");
 
ResultFeature pg2 = model.result().create("pg2",3);
pg2.create("line2","Line");
pg2.feature("line2").set("data", "cp1");
pg2.feature("line2").set("expr", "2*u");
pg2.feature("line2").set("colortable", "Thermal");
 
pg2.run();
Code for Use with MATLAB
ds2 = model.result.dataset.create('cp1', 'CutPlane');
ds2.set('data', 'dset2');
 
pg2 = model.result.create('pg2',3);
pg2.create('line2','Line');
pg2.feature('line2').set('data', 'cp1');
pg2.feature('line2').set('expr', '2*u');
pg2.feature('line2').set('colortable', 'Thermal');
 
pg2.run;
See Also
LineGraph