TubeData
Create a tube data plot.
Syntax
model.result(<pgtag>).create(<ftag>,"TubeData");
model.result(<pgtag>).feature(<ftag>).set(property, <value>);
model.result(<pgtag>).feature(<ftag>).run();
Description
model.result(<pgtag>).create(<ftag>,"TubeData") creates a tube data plot feature named <ftag> belonging to the 2D or 3D plot group <pgtag>.
Tube data plots are used to visualize raw point data given as points, elements, and colors as tubes (see the examples below). Tube data plots can be added to 2D and 3D plot groups.
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.
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 are not plotted.
The title to use when titletype is manual.
auto | label | manual | none
auto, if the title should be computed automatically. 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
Attribute
MaterialAppearance
Examples
A method for creating a logarithmic tube spiral in 2D:
Code for Use with Java
String pgTag = model.result().uniquetag("pg");
ResultFeature pg = model.result().create(pgTag, 2);
ResultFeature plot = pg.create("tube1", "TubeData");
int N = 100;
double[][] p = new double[2][N];
double[] radius = new double[N];
for (int i = 0; i < N; i++) {
double par = 0.05*i;
p[0][i] = Math.exp(par)*Math.cos(3*par);
p[1][i] = Math.exp(par)*Math.sin(3*par);
radius[i] = 0.3;
}
plot.set("pointdata", p).set("radiusdata", radius);
A method for creating a logarithmic tube spiral in 3D:
Code for Use with Java
String pgTag = model.result().uniquetag("pg");
ResultFeature pg = model.result().create(pgTag, 3);
ResultFeature plot = pg.create("tube1", "TubeData");
int N = 1000;
double[][] p = new double[3][N];
double[] radius = new double[N];
double[] color = new double[N];
for (int i = 0; i < N; i++) {
double par = 0.005*i;
p[0][i] = Math.exp(par)*Math.cos(10*par);
p[1][i] = Math.exp(par)*Math.sin(10*par);
p[2][i] = 0.1*i;
radius[i] = 0.2*Math.sqrt(i+1);
color[i] = i;
}
plot.set("pointdata", p)
.set("radiusdata", radius)
.set("colordata", color)
.set("coloring", "colortable");
See Also
AnnotationData, ArrowData, LineData, PointData, SurfaceData