2.10.27 plotm

Brief Information

Create plot from matrix

Additional Information

Minimum Origin Version Required: 9.0 SR0

Command Line Usage

plotm im:=[Func]1!1 plot:=103 x:=2 y:=3;

plotm plot:=220 ogl:=<new template:=image>;

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input Matrix im

Input

vector

<active>
The matrix as Z matrix for creating 3D (parametric) function plot, or the 2D loose dataset.
Plot Type plot

Input

int

103
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

1
Specify whether to rescale the plot (1) or not (0).
Layer to Plot into ogl

Output

GraphLayer

[<new template:=GLMesh>]<new>
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

0
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

0
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

0
Specify the color matrix index.
  • 0= Fill surface piece by piece, not front matrix.
  • 1= Specify the index 1 Matrix Object (in the same Matrix Sheet of the Input Matrix ) to fill surface color to contour lines.
  • 2= Specify the index 2 Matrix Object (in the same Matrix Sheet of the Input Matrix ) to fill surface color to contour lines.
  • and so on
Hide Newly Created Graph hide

Input

int

0
Specify whether to hide the created graph (1) or not (0).

Description

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.

Examples

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

Related X-Functions

plotms