Create plot from matrix
Minimum Origin Version Required: 9.0 SR0
plotm im:=[Func]1!1 plot:=103 x:=2 y:=3;
plotm plot:=220 ogl:=<new template:=image>;
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Input Matrix | im |
Input vector |
|
The matrix as Z matrix for creating 3D (parametric) function plot, or the 2D loose dataset. |
Plot Type | plot |
Input int |
|
The plot type for the 3D plot/image plot from matrix. For the list of all plot types, see Plot Type IDs. Note: only the plot types for matrix object can be used. |
Rescale | rescale |
Input int |
|
Specify whether to rescale the plot (1) or not (0). |
Layer to Plot into | ogl |
Output GraphLayer |
|
The target layer for the plot.
The default creates a new graph, or you can supply your own custom Template. |
X Matrix Object Index for Parameter Surface | x |
Input int |
|
Specify the X matrix object index for parameter surface, which must be in the same matrix sheet as the Z matrix. |
Y Matrix Object Index for Parameter Surface | y |
Input int |
|
Specify the Y matrix object index for parameter surface, which must be in the same matrix sheet as the Z matrix. |
Color Matrix Index | cm |
Input int |
|
Specify the color matrix index.
|
Hide Newly Created Graph | hide |
Input int |
|
Specify whether to hide the created graph (1) or not (0). |
This X-Function is capable of creating 3D function plot, 3D parametric function plot or image/contour plot, from the specified matrices or the 2D loose datasets.
The following script example will show how to create 2D loose datasets, and then create matrices from these 2D loose datasets, and finally make a 3D parametric function plot from the matrices.
create myx -fp2 20 v*cos(u) 0 6.28 50 0 5; // X parametric surface create myy -fp2 20 v*sin(u) 0 6.28 50 0 5; // Y parametric surface create myz -fp2 20 (v*v*cos(u)*cos(u)+v*v*sin(u)*sin(u))/2 0 6.28 50 0 5; // Z matrix create Func -mfp myz myx myy "u,v"; // create 3 matrix objects, with Z, X, and Y respectively plotm im:=[Func]1!1 plot:=103 x:=2 y:=3; // 3D parametric function plot, X and Y parametric surfaces are from the 2nd and 3rd matrix objects respectively