Skip to main content
Skip table of contents

Script Manual

Description

The Evince scripting tool is used for creating customized workflows with an easy-to-use script. The available scripting functions and how to use them are described in the coming sections.

Symboling

Each function must end with the ; character

dataset = load("data file");

Comments are made in the script as followed:

/* comment */

A range is set as followed:

5:9 /* denotes the range 5 to 9 */

[] /* denotes a array of numbers */

[0,1,2,3,4,5,10,14,20:25]

@ is a symbol for adding text strings

"start" @ "end" -> "startend"

\n within quotation mark means end if line

"line1\nline2"

Getting started

A script can either be executed directly from Evince when importing a new project or from a web homepage using a script and Evince web start.

The easiest way to create a new script is to export the script as a template from Evince history panel. The script is based on the actions that the user has been made in Evince and can directly be used to repeat the actions on a new data file.

Evince import template

Evince has a default template directory under .Evince in the user home folder. The directory is called Script and will contain all user-defined templates. These templates are loaded in the last step of the import wizard and can be chosen from the drop-down component.

Evince web start

Adapted script can be transferred to Evince using Evince web start. The script text is defined as an argument in the jnlp file called script. Example:

XML
<?xml version="1.0" encoding="utf-8" ?>
<!-- JNLP File for Evince Application -->
<jnlp spec="1.0" codebase="http://" href="evince_script.jnlp">
    <information>
        <title>Evince Script, Web Start</title>
        <vendor>Prediktera AB</vendor>
        <description>Evince Web Start</description>
    </information>
    <resources>
        <j2se version="1.5+" href="http://java.sun.com/products/autodl/j2se" initial-heap-size="64M" maxheap-size="1024M" />
        <jar href="Evince.jar"/>
        <extension name="libraries.jnlp" />
        <property name="webstart" value="true"/>
        <property name="script" value="[SCRIPT TEXT]"/>
    </resources>
    <application-desc main-class="map.GUI"/>
    <security>
        <all-permissions/>
    </security>
</jnlp> 

See "Deploying Software with JNLP and Java Web Start" for more information.

Available functions

General

and

Description:

And condition

Syntax:

and(num1)

and(num1, num2)

Example:

appendlist

Description:

Append data to list

Syntax:

appendlist(paramlist)

Example:

appendnum

Description:

Append a number to a list of numbers

Syntax:

appendnum(num)

appendnum(numlist, num)

Example:

apply

Description:

Apply algorithm

Syntax:

apply(param)

apply(analysis_type, data)

apply(analysis_type, data, properties)

Example:

analysis type

• blobcounte

bringToFront

Description:

Bring progress window to front

Syntax:

bringToFront()

Example:

changeState

Description:

Change state (disc or memory) on dataset or matrix Syntax:

changeState(dti, properties)

Example:

cleanUp

Description:

Clean up a variable from memory

Syntax:

cleanUp(dti)

cleanUp()

Example:

close

Description:

Close project

Syntax:

close()

Example:

combinations

Description:

Get all combinations of index

Syntax:

combinations(size, groups)

Example:

comparefiles

Description:

Compare two files

Syntax:

comparefiles(path1, path2)

Example:

cond

Description:

The condition between two logical parameters. I.e equal, greater or less Syntax:

cond(type, num1, num2)

Example:

connected

Description:

Check if a model is connected to another model

Syntax:

connected(param)

Example:

createPlot

Description:

Create new plot

Syntax:

createPlot(plot_type, variable)

createPlot(plot_type, variable, group index)

createPlot(plot_type, variable, group index, properties)

createPlot(project_ g u iplot_type, variable, group index, properties) createPlot(plot_type, variable, properties)

Example:

Score_plot2 = createPlot("scatter2d", T);

plot1 = createPlot("scatter2d", orig_matrix); // Create a scatter 2D plot from orig_matrix

plot type

  • Image Model Collection

  • Model Collection

  • Model Overview

  • Score 2D Density

  • Score RGB Image

  • Score 2D

  • Score 3D

  • Loading

  • Loading 3D

  • Loading Line

  • Loading Column

  • Ypred Contour 2D

  • Image

  • Multiple Ypred Contour

  • 2D Images

  • Ypred Contour 2D

  • Concentration Image

  • Multiple Ypred Contour

  • 2D Concentration

  • Images

  • Observed vs Calculated

  • Observed vs Calculated

  • CV

  • Distance to Model

  • Inner Relation

  • Bi - plot (T/P)

  • Bi - plot (T/W)

  • Coefficient

  • Column

  • Column Stacked

  • Contour 2D

  • Contour 2D Prediction

  • Contour 3D

  • Contribution

  • Cooman's Plot

  • Cube 3D

  • Dendrogram

  • Design

  • Histogram

  • Image DataSet

  • Collection

  • Line

  • Line Stacked

  • Model Container

  • Overview

  • Molecule

  • 6

  • RGB Image

  • Scatter 2D

  • Scatter 2D Density

createReport

Description:

Create a html report in a given directory

Syntax:

createReport(type, path, name)

createReport(type, path, filename, properties)

Example:

createTable

Description:

Create new table

Syntax:

createTable(table_type, variable)

createTable(table_type, variable, properties)

createTable(project_ g u itable_type, variable, properties)

Example:

table1 = createTable("datatable", dataset); // Creates a data table from dataset

table type

  • Component Table

  • Data Table

  • Molecules

  • New DataSet

  • Object Identification

  • table

  • Prediction Table

  • Quantification Table

  • View DataSet

createWizard

Description:

Create a wizard frame

Syntax:

createWizard()

createWizard(title)

createWizard(title, properties)

Example:

defaultvalue

Description:

Set default value on variable that has no given value

Syntax:

defaultvalue(param)

Example:

difference

Description:

Difference between files, in square root error

Syntax:

difference()

Example:

equal

Description:

Deprecated - Check if two or many objects are equal Syntax:

equal(param)

Example:

equals

Description:

Check if two or many objects are equals

Syntax:

equals(param)

equals(arg0)

Example:

exist

Description:

DEPRECATED - Check if variation or file exist

Syntax:

exist(obj)

Example:

exists

Description:

Check if variation or file exists

Syntax:

exists(obj)

Example:

exit

Description:

Exit Evince

Syntax:

exit()

Example:

exportReport

Description:

Export a report to a given location

Syntax:

exportReport(path, properties)

Example:

file

Description:

Create file data class from file path

Syntax:

file(path)

file(path, properties)

Example:

filelist

Description:

Make a list of object parameters

Syntax:

filelist(param)

Example:

filter

Description:

Filter data tree

Syntax:

filter(filter)

Example:

format

Description:

Format string

Syntax:

format(obj)

format(obj, properties)

format(value, negativevalue, percent, cappercent, intvalue, ndigits)

formatTime

Description:

Format time in msec, sec, min, hour and days

Syntax:

formatTime(value)

formatTime(strdate)

Example:

getChangedDirectories

Description:

Sleep until change in a one or several directories and return a list of these directories.

Syntax:

getChangedDirectories(root directory)

Example:

getColor

Description:

Get color from RGB or HTML

Syntax:

getColor(red, green, blue)

getColor(red, green, blue, alpha)

getColor(color string)

Example:

getConstant

Description:

Get a constant from Evince.

Syntax:

getConstant(constant)

getConstant(constant, parameter)

Example:

constant parameters

  • filename - Get project file name

  • version - Get Evince version

getSettings

Description:

Get User or other settings

Syntax:

getSettings(type)

Example:

hide

Description:

Hide layout

Syntax:

hide()

hide(workspace1, ..., workspace3)

Example:

hide("datatree", "settings")

workspace parameters

  • datatree

  • grapharea

  • tablearea

  • plotarea

  • settings

  • historyarea

  • modelarea

launch

Description:

Launch external application

Syntax:

launch(command)

list

Description:

List all windows from plot, table, models or dataset and models

Syntax:

list(root)

list(root, properties)

list(param)

list(param, properties)

list(list type)

list(list type, properties)

list2str

Description:

Make a string from a list

Syntax:

list2str(list)

list2str(list, properties)

listColumns

Description:

List all columns of a given matrix. The column are returned as string objects of the column name

Syntax:

listColumns(matrix)

listColumns(model)

listCombine

Description:

Combine lists with for example merge or intersect

Syntax:

listCombine(param)

listContains

Description:

Check if the list contains a specific item

Syntax:

listContains(param)

listFiles

Description:

List files in a given directory. The files are returned as file objects Syntax:

listFiles(path, extensions)

listFiles(path, extensions, properties)

listFiles(path, extensions)

listFiles(path, extensions, properties)

listFiles(alist, path, extensions, recursive, includefolder, checkmapfile, includereference)

listGet

Description:

Get parameter in a given list at a given location

Syntax:

listGet(list, index)

listSize

Description:

Get the size of a given list

Syntax:

listSize(param)

load

Description:

Loads a file holding data that will be predicted. The prediction dataset is specified in the index page.

Syntax:

load(filename)

load(filename, obs descr, var descr)

load(filename, obs descr, var descr, properties)

load(filename, obs descr, var descr, file type, option)

load(filename, obs descr, var descr, file type, option, properties) load(project_ g u ifilename, obs descr, var descr, file type, option, properties)

load(filename, properties)

load(filename, file type, option)

load(filename, file type, option, properties)

Example:

predictiondataset = load("filename")

predictiondataset = load("filename",[1,5], 7,#,1, 4, "txt", "comma");

loads prediction file and sets columns 1 to 5 to observation identifiers and row 1 to variable identifier

predictiondataset = load("filename","txt", "comma");

file type parameters

  • txt

  • csv

  • excel

  • mat

  • envi

loadImage

Description:

Loads an image from file.

Syntax:

loadImage(filename)

loadImage(filename, properties)

loadModel

Description:

Loads a calibration model. Calibration models 1 to n are specified in the index page.

Syntax:

loadModel(fdc)

loadModel(filename)

loadModel(filename, properties)

loadModel(filename, map i d)

loadModel(filename, map i d, properties)

Example:

model2 = loadModel($calibrationmodel2);

loadModels

Description:

Loads several calibration models from an Evince project

Syntax:

loadModels(filename)

loadMulti

Description:

Loads multi files.

Syntax:

loadMulti(files, properties)

math

Description:

Apply a mathematical operation on a number Syntax:

math(operation)

math(operation, number)

math(operation, number)

math(operation, number1, number2)

Example:

operations

  • abs

  • min

  • max

  • sqrt

  • exp

  • pow

  • pi

  • mod

  • div

  • floor

  • ceil

  • int

mod

Description:

Modular

Syntax:

mod(d1, d2)

not

Description:

Negate logical parameter

Syntax:

not(num)

number

Description:

Create a number from a string

Syntax:

number(obj)

number(obj, properties)

numlist

Description:

Make a list of number parameters

Syntax:

numlist(max)

numlist(numlist)

numlist(min, max)

numlist(min, max, size)

or

Description:

Or condition

Syntax:

or(num1, num2)

performance

Description:

Test performance

Syntax:

performance(type)

print

Description:

Print text to system out

Syntax:

print(str)

print(str, properties)

project

Description:

Handling of Evince projects

Syntax:

project(option)

project(option, data set)

properties

Description:

Make a property of object parameters

Syntax:

properties(param)

publishReport

Description:

Publish a report to a given location

Syntax:

publishReport(path, properties)

random

Description:

A random value between the given min and max index

Syntax:

random(min, max)

random(min, max, properties)

randomlist

Description:

A list of random values between the given min and max index

Syntax:

randomlist(min, max, size)

rank

Description:

Rank value between given index

Syntax:

rank(num, min, max, rankmin, rankmax)

rank(num, min, max, rankmin, rankmax, properties)

runGC

Description:

Run Garbage Collection

Syntax:

runGC()

save

Description:

Save as Evince project

Syntax:

save(file path)

save(file path, properties)

save(project_ g u i, file path, properties)

saveGraph

Description:

Save one or several models graph connection.

Syntax:

saveGraph(param)

savePerformance

Description:

Save performance from script session to file

Syntax:

savePerformance(path)

savePerformance(path, file)

saveScreenshot

Description:

Save a screenshot of Evince

Syntax:

saveScreenshot(path)

selection2number

Description:

Make a number array from a selection

Syntax:

selection2number(selection)

setMode

Description:

Set script mode

Syntax:

setMode(mode)

setSettings

Description:

Set User or other settings

Syntax:

setSettings(type, value)

show

Description:

Show project

Syntax:

show()

show(plot)

show(plot, group index, properties)

show(table)

show()

show(workspace1, ..., workspace3)

show(properties)

Example:

show("plotarea", "tablearea");

workspace parameters

  • datatree

  • grapharea

  • tablearea

  • plotarea

  • settings

  • historyarea

  • modelarea

showHint

Description:

Show hint dialog

Syntax:

showHint(text)

showHint(text, image)

showInputDialog

Description:

Show input dialog

Syntax:

showInputDialog(type, title)

showInputDialog(type, title, value)

showInputDialog(type, title, defaultfile)

showInputDialog(type, title, defaultfile)

showListDialog

Description:

Show input dialog for lists

Syntax:

showListDialog(param)

sleep

Description:

Sleep thread for amount a milliseconds

Syntax:

sleep(msec)

strcmp

Description:

Compare two string and return if thay are equal Syntax:

strcmp(s1, s2)

string

Description:

Convert to string

Syntax:

string(object)

strlen

Description:

Return the length of a string

Syntax:

strlen(s)

strlist

Description:

Make a list of object parameters

Syntax:

strlist(param)

strlist(strlist)

tree

Description:

Apply data tree specific actions

Syntax:

tree(method)

tree(method, data)

type

Description:

Get the type of an object

Syntax:

type(obj)

viewReport

Description:

View a report in a given directory

Syntax:

viewReport(type, path, filename, properties)

write

Description:

Write text to file

Syntax:

write(str, filename)

write(str, filename, properties)

writeBinary

Description:

Write binary values to file

Syntax:

writeBinary(value, filename)

writeBinary(value, filename, properties)

Case

createDataSet

Description:

Create a new dataset

Syntax:

createDataSet()

createDataSet(ask name)

createDataSet(ask name)

createDataSet(component, ask name)

Matrix

get

Description:

Get value from matrix

Syntax:

get(type)

get(type, index)

get(arg0)

get(arg0)

getLastSubMatrix

Description:

If the matrix has sub-matrices this method will return the last sub-matrix Syntax:

getLastSubMatrix()

getPercent

Description:

Get a specified value from the given matrix as a percent. The value is represented as a string percent value. If no position is specified the last value will be returned.

Syntax:

getPercent()

getPercent(xy)

getPercent(x, y)

Example:

getValue(5,10); Returns the value on column 5 and row 10

getSize

Description:

Get matrix size (rows * column)

Syntax:

getSize()

getValue

Description:

Get a specified value from the given matrix. The value is represented as a string value. If no position is specified the last value will be return. Syntax:

getValue()

getValue(asker, row, col)

getValue(xy)

getValue(x, y)

getValue(row, col)

getValue(xstr, ystr)

Example:

getValue(5,10); Returns the value on column 5 and row 10

index

Description:

Get index of rows or columns.

Syntax:

index(direction, type, values)

interval

Description:

Get interval between given min and max values

Syntax:

interval(min, max)

interval(variable index, min, max)

list

Description:

List either rows or columns

Syntax:

list(type)

save

Description:

Save the current matrix to disc

Syntax:

save(filename)

save(filename, format)

save(filename, format, properties)

save(filename, format, delimiter)

save(filename, format, delimiter, properties)

Example:

matrix.save("C:\matrix.txt","csv"); Saves matrix to the file matrix.txt

format parameters

  • csv

wildcard

Description:

Get interval from the description with a given wildcard

Syntax:

wildcard(direction, wildcards)

Dataset

applyChanges

Description:

Apply changes to data set and data set models.

Syntax:

applyChanges()

applyChanges(properties)

cloneDataSet

Description:

Makes a copy of the current dataset.

Syntax:

cloneDataSet()

cloneDataSet(add to data tree)

cloneDataSet(parent)

cloneDataSet(parent)

cloneDataSet(parent, ask name)

close

Description:

The close case for a dataset in the project.

Syntax:

close()

createModel

Description:

Creates a model from the specified dataset.

Syntax:

createModel(model_type)

createModel(model_type, components_number)

createModel(model_type, components_number, properties)

createModel(model_type, properties)

Example:

model = dataset.createModel("pca", 3); creates a three-component pcamodel from the dataset "dataset"

model type

  • PCA

  • PCY

  • PLS

  • PLS - DA

  • SIMCA

createModification

Description:

Creates a modification for observations or variables.

Syntax:

createModification(direction_type, modification_type)

createModification(direction_type, modification_type, index)

createModification(direction_type, modification_type, index)

createModification(direction_type, modification_type, index, properties)

createModification(direction_type, modification_type, properties)

createModification(direction_type, modification_type, selection)

createModification(direction_type, modification_type, selection, properties)

direction type

  • obs

  • var

modification type

  • Category

  • New Observation

  • Center

  • UV Scale

  • Pareto

  • Quad Term

  • Interaction Term

  • Function

  • Logarithm

  • Remove Property

  • Scores

  • Base - line correction

  • Derivative

  • MSC Transform

  • SNV Correction

  • Savitzky - Golay

  • Category

  • New Variable

  • APol

  • Amino Acid Count

  • Aromatic Atoms Count

  • Aromatic Bonds Count

  • Atom Count

  • BPol

  • Bond Count

  • Carbon Connectivity
    Order One

  • Carbon Connectivity
    Order Zero

  • Eccentric Connectivity
    Index

  • Fragment Complexity

  • HBond Acceptor Count

  • HBond Donor Count

  • Kappa Shape Indices

  • Largest Chain

  • Largest Pi System

  • Longest Aliphatic Chain

  • Petitjean Number
    Descriptor

  • Rotatable Bonds Count

  • Rule Of Five

  • TPSA

  • Valence Carbon
    Connectivity Order One

  • Valence Carbon
    Connectivity Order Zero

  • Vertex adjacency

  • Weight

direction parameters

  • obs - Observation data

  • obsid - Observation description • var - Variable data

  • varid - Variable description

modification type parameters

  • center

  • uvscale

  • logarithm

  • class

  • pareto

  • quadterm

  • interactionterm

delete

Description:

Delete this dataset.

Syntax:

delete()

deleteModification

Description:

Delete a modification for observations or variables. Syntax:

deleteModification(direction_type, transform)

deleteModification(direction_type, name)

deleteModification(direction_type, name, transform)

direction type

  • obs

  • var

exclude

Description:

Excludes observations or variables.

Syntax:

exclude(primary array)

exclude(direction)

exclude(direction, params)

exclude(direction, type, properties)

exclude(direction, model, class index)

exclude(direction, model, class index)

exclude(direction, model, class index)

exclude(direction, category, class name)

exclude(direction, category name, class index)

exclude(direction, category name, class index)

exclude(direction, category name, class name)

Example:

dataset.exclude("var",1,[2,4]); // exclude variable 1 and observation 2 to 4

excludeMissing

Description:

Exclude observations or variables with missing values

Syntax:

excludeMissing(direction, properties)

get

Description:

Gets a data matrix from the current dataset.

Syntax:

get(name)

get(arg0)

Example:

originalMatrix = preddataset1.get("originalmatrix"); // set original matrix into variable originalMatrix

common data matrix names

  • originalmatrix

  • case

  • xtrain

  • ytrain

  • xtest

  • ytest

getCategory

Description:

Get category or prediction category by name. Syntax:

getCategory(data info, name)

getCategory(name)

getEnv

Description:

Get environmental properties from dataset

Syntax:

getEnv(name)

getMeta

Description:

Get meta properties from dataset

Syntax:

getMeta(name)

getProperty

Description:

Get project property by name

Syntax:

getProperty(property)

getProperty(property, default value)

getRef

Description:

Get reference properties from dataset

Syntax:

getRef(name)

hasModification

Description:

Check if a specified modification exists.

Syntax:

hasModification(direction_type, name)

direction type

  • obs

  • var

hasX

Description:

Return if data set has x values.

Syntax:

hasX()

hasX(properties)

hasX(properties, size)

hasY

Description:

Return if the data set has y values.

Syntax:

hasY()

hasY(properties)

include

Description:

Includes observations or variables.

Syntax:

include(primary array)

include(direction, index)

include(direction, class name, sub class index) include(direction, category name, class name)

includeOnly

Description:

Includes only observations or variables.

Syntax:

includeOnly(selection, sizearray)

includeOnly(primary array)

includeOnly(direction, model, selectionalgorithm, number)

includeOnly(direction, model, selectionalgorithm, number, properties) includeOnly(direction, category, class name)

includeOnly(direction, model, class name)

includeOnly(direction, category, class name, properties)

includeOnly(direction, selection)

includeOnly(direction, selection, sizearray, properties)

includeOnly(direction, description)

includeOnly(direction, category name, class name)

includeOnly(direction, model, sub class name, properties)

includeOnly(direction, class name, sub class name, properties)

index

Description:

Get an index of variables or observations.

Syntax:

index(model, selectionalgorithm, number)

index(model, selectionalgorithm, number, properties)

index(direction, param)

index(direction, type, str values)

index(direction, type, values)

list

Description:

List variables, observations etc.

Syntax:

list(type)

list(direction, type)

Example:

select

Description:

Make a selection in dataset

Syntax:

select(array)

Example:

setName

Description:

Set the name of the current dataset.

Syntax:

setName(name)

setName(arg0)

Example:

preddataset1.setName("pred dataset 1"); // set preddataset1 name to "pred dataset 1"

setProtected

Description:

Protect or unprotected dataset.

Syntax:

setProtected()

setProtected(properties)

setProtected(arg0)

setTest

Description:

Sets observations to or remove observations from the test set.

Syntax:

setTest(transform)

setTest(true/ false)

setTest(bool, index)

setTest(true/ false, index)

setTest(incvalue, category name, class index)

setTest(incvalue, category name, class name)

setTest(setstr, index)

setTest(setstr, index, properties)

setTest(category name, class name)

Example:

dataset.setTest(false,[1,5]); // Removes observations 1 to 5 from the test set

setTrain

Description:

Sets observations to or removes observations from the training set.

Syntax:

setTrain(transform)

setTrain(true/false)

setTrain(true/false, index)

setTrain(incvalue, class name, sub class index)

setTrain(incvalue, class name, sub class name)

Example:

dataset.setTrain(false,[1,5]); // Removes observations 1 to 5 from the training set

setX

Description:

Sets variables to X.

Syntax:

setX(index)

setX(class name)

setX(category name, class name)

Example:

dataset.setX(1);

setY

Description:

Sets variables to Y.

Syntax:

setY(index)

setY(category name)

setY(category name, class name)

Example:

dataset.setY(2); // Sets variable 2 as a Y-variable

Modification

delete

Description:

Delete modification

Syntax:

delete()

get

Description:

Get value by string

Syntax:

get(name)

set

Description:

Set value in a given index

Syntax:

set(param)

setName

Description:

Set name of the current modification.

Syntax:

setName(name)

setName(arg0)

Model

addPrediction

Description:

Add a prediction from a specified connect model

Syntax:

addPrediction(prediction)

addPrediction(data set, pred category, pred class)

addPrediction(data set, pred category, pred class, properties)

applyChanges

Description:

Apply DataSet changes to Model

Syntax:

applyChanges()

applyChanges(properties)

connectToParentModel

Description:

Connect a model to a parent model by class name

Syntax:

connectToParentModel(parent model, classname)

createPrediction

Description:

Returns the prediction statistics for the prediction dataset from the specified calibration model.

Syntax:

createPrediction(data set)

createPrediction(pred data set, properties)

Example:

result = calibrationmodel.createPrediction(predictiondataset);

delete

Description:

Close and remove model from data tree.

Syntax:

delete()

get

Description:

Returns a matrix from the data tree or from the prediction results.

Syntax:

get(name)

get(arg0)

Example:

Tpred = result.get("Tpred"); // gets Tpred frokm prediction results "result1"

common data matrix name

  • xtr

  • t

  • tpred

getComponents

Description:

Get the number of components for the specified model. The returned value is represented as a string.

Syntax:

getComponents()

Example:

calibrationmodel1.getComponents(); // get the number of components for calibrationmodel1

getName

Description:

Get name of the current model.

Syntax:

getName()

getPrediction

Description:

Get prediction by index or name.

Syntax:

getPrediction(index)

getPrediction(name)

getSubModel

Description:

Get sub-model by index or name.

Syntax:

getSubModel(index)

getSubModel(name)

getYmax

Description:

Get the maximum value from y for a given index Syntax:

getYmax()

getYmax(index)

getYmax(index, properties)

getYmin

Description:

Get the minimum value from y for a given index

Syntax:

getYmin()

getYmin(index)

getYmin(index, properties)

list

Description:

List data from a model

Syntax:

list(type)

save

Description:

Save the current model to disc.

Syntax:

save(file)

save(file, properties)

save(file path)

save(file path, properties)

Example:

calibrationmodel1.save("C:\model.mdl"); // Saves calibrationmodel1 to the file model.mdl

set

Description:

Set properties to model as i.e. critical distance value

Syntax:

set(name, num)

set(arg0, arg1)

setName

Description:

Set the name of the current model.

Syntax:

setName(arg0)

setProtected

Description:

Protect or unprotected model

Syntax:

setProtected()

setProtected(properties)

setProtected(arg0)

Prediction

get

Description:

Get data by name

Syntax:

get(name)

get(arg0)

Table

close

Description:

Close table

Syntax:

close()

get

Description:

Get sub-table

Syntax:

get(name)

get(arg0)

setCellHeight

Description:

Set table cell height.

Syntax:

setCellHeight(height)

setCellWidth

Description:

Set table cell width.

Syntax:

setCellWidth(width)

Plot

addImageArea

Description:

Add a image area into the given plot.

Syntax:

addImageArea(image, layout)

addImageArea(image, layout, properties)

addImageArea(imagefile, layout)

Example:

scatter2d_plot1.addTextArea("Text", "bottom"); // Adds a text area on the bottom of plot scatter2d_plot1 with the text "Text"

layout parameters

  • top

  • bottom

  • left

  • right

  • center

  • free

addLayer

Description:

Adds a layer to a plot. The new layer is returned

Syntax:

addLayer(matrix)

Example:

layer1 = score_plot1.addLayer(Tpred1); Adds Tpred1 as layer1 to the plot "score_plot1"

addLegend

Description:

Add legend to plot

addShape

Description:

Add a shape onto the plot as a new window

Syntax:

addShape(shape, color, coordinates)

addSwitchArea

Description:

Add a switch area into the given plot.

Syntax:

addSwitchArea(text, type, layout)

Example:

scatter2d_plot1.addTextArea("Text", "bottom");

/* Adds a text area on the bottom of plot scatter2d_plot1 with the text "Text" */

layout parameters

  • top

  • bottom

  • left

  • right

  • center

  • free

addTextArea

Description:

Add a text area into the given plot.

Syntax:

addTextArea(text, layout)

addTextArea(text, layout, properties)

Example:

scatter2d_plot1.addTextArea("Text", "bottom");

/* Adds a text area on the bottom of plot scatter2d_plot1 with the text "Text" */

layout parameters

  • top

  • bottom

  • left

  • right

  • center

  • free

close

Description:

Close plot

Syntax:

close()

copyToClipboard

Description:

Copy Plot to Clipboard

Syntax:

copyToClipboard()

copyToClipboard(properties)

createImage

Description:

create an image data object with a given dimensions Syntax:

createImage(res x, res y)

createImage(res x, res y, properties)

createImage(arg0)

createImage(arg0, arg1)

get

Description:

Get data by name

Syntax:

get(name)

get(arg0)

getArea

Description:

Get specific area; center, title or axis description

Syntax:

getArea(name)

getGroupIndex

Description:

Get current group index

Syntax:

getGroupIndex()

getLayer

Description:

Get a layer from a plot with a given index. The layer is returned Syntax:

getLayer(index)

list

Description:

List data by name

Syntax:

list(name)

list(arg0, arg1)

list()

Example:

refresh

Description:

Repaint plot

Syntax:

refresh()

Example:

removeArea

Description:

Remove specific area

Syntax:

removeArea(float window)

removeArea(name)

save

Description:

Saves plot to specified filename. Return created image file

Syntax:

save(filename, format)

save(path, type, res x, res y)

save(path, type, res x, res y, properties)

Example:

scatter2d_plot1.save("filename", "png", 500, 500);

/* Saves the scatter2d_plot1 to "filename" with format "png". X-resolution is 500 and Y-resolution is 500 */

format parameters

  • png

  • tiff

  • jpg

  • gif

select

Description:

Make a selection in the plot

Syntax:

select(param)

set

Description:

Set data by name

Syntax:

set(name, value)

set(arg0, arg1)

setAxisLabel

Description:

Set axis labeling on a given axis

Syntax:

setAxisLabel(param)

setBackgroundColor

Description:

Set background color

Syntax:

setBackgroundColor(color)

setColor

Description:

Sets the colours for the objects of a plot layer.

Syntax:

setColor(primary_type, color_type)

Example:

setColor("fixed", "red"); // Set fixed red color

primary type

  • value

  • fixed

  • none

  • index

  • identifier

  • category

  • density

  • perspective

  • matrix

  • amplitude

  • average

  • sum

  • missing

  • hotelling

  • dcrit

  • confidence

  • vector

  • predictioncategory

  • coomans

  • dataimage

  • objectcentrum

  • profile

  • linearregression

  • limits

  • components

  • origindex

color type

  • red

  • green

  • blue

  • yellow

  • orange

  • white

  • black

  • cyan

  • darkgray

  • gray

  • lightgray

  • magenta

  • pink

  • brown

  • purple

  • none

  • transparent

setComment

Description:

Set comment to a plot layer. The comment will appear then the mouse is hovered over a object in the plot.

Syntax:

setComment(primary_type)

Example:

setComment("category"); // Show comment on object by category

primary type

  • value

  • fixed

  • none

  • index

  • identifier

  • category

  • density

  • perspective

  • matrix

  • amplitude

  • average

  • sum

  • missing

  • hotelling

  • dcrit

  • confidence

  • vector

  • predictioncategory

  • coomans

  • dataimage

  • objectcentrum

  • profile

  • linearregression

  • limits

  • components

  • origindex

setDataRange

Description:

Sets which vector to plot for a given axis. Syntax:

setDataRange(param)

setGridColor

Description:

Set plot grid color

Syntax:

setGridColor(color)

setLabel

Description:

Set labels for the objects of a plot layer.

Syntax:

setLabel(primary_type, font_number)

Example:

setLabel("value", 5); // Set label from value with font size 5

primary type

  • value

  • fixed

  • none

  • index

  • identifier

  • category

  • density

  • perspective

  • matrix

  • amplitude

  • average

  • sum

  • missing

  • hotelling

  • dcrit

  • confidence

  • vector

  • predictioncategory

  • coomans

  • dataimage

  • objectcentrum

  • profile

  • linearregression

  • limits

  • components

  • origindex

setLayerOrder

Description:

Set order of layer from 1 and upwards

Syntax:

setLayerOrder(layer, order)

Example:

setLegend

Description:

Add legend to plot

Syntax:

setLegend(layer, legend_type, layout_type)

Example:

setLegend(layer, "category", "right"); // Add legend for layer by class on the right side of the plot

legend type

  • color

  • class

legend type

  • color

  • shape

  • layer

layout type

  • top

  • bottom

  • left

  • right

  • center

  • free

setLine

Description:

Set lines between the objects of a plot layer.

Syntax:

setLine(primary_type)

Example:

setLabel("index"); // Draw lines between object by index

primary type

  • value

  • fixed

  • none

  • index

  • identifier

  • category

  • density

  • perspective

  • matrix

  • amplitude

  • average

  • sum

  • missing

  • hotelling

  • dcrit

  • confidence

  • vector

  • predictioncategory

  • coomans

  • dataimage

  • objectcentrum

  • profile

  • linearregression

  • limits

  • components

  • origindex

setPlotBackgroundColor

Description:

Set plot background-color

Syntax:

setPlotBackgroundColor(color)

setSelectionColor

Description:

Set selection color

Syntax:

setSelectionColor(color, properties)

setSelectionTool

Description:

Set current selection tool

Syntax:

setSelectionTool(selection tool)

Example:

setShape

Description:

Sets the shapes for the objects of a plot layer.

Syntax:

setShape(primary_type, shape_type)

Example:

setShape("fixed", "square"); // Set fixed square shape

primary type

  • value

  • fixed

  • none

  • index

  • identifier

  • category

  • density

  • perspective

  • matrix

  • amplitude

  • average

  • sum

  • missing

  • hotelling

  • dcrit

  • confidence

  • vector

  • predictioncategory

  • coomans

  • dataimage

  • objectcentrum

  • profile

  • linearregression

  • limits

  • components

  • origindex

shape type

  • Circle

  • Square

  • Upper Triangle

  • Lower Triangle

  • Diamond

  • Hollow Circle

  • Hollow Square

  • Hollow Upper Triangle

  • Hollow Lower Triangle

  • Hollow Diamond

  • Plus

  • Cross

  • Cross and Line

  • Line

setSize

Description:

Sets the sizes for the objects of a plot layer.

Syntax:

setSize(primary_type, min_number, max_number)

setSize(arg0, arg1)

setSize(arg0)

Example:

setSize("index", 5, 15); // Set size by index from 5 to 15

primary type

  • value

  • fixed

  • none

  • index

  • identifier

  • category

  • density

  • perspective

  • matrix

  • amplitude

  • average

  • sum

  • missing

  • hotelling

  • dcrit

  • confidence

  • vector

  • predictioncategory

  • coomans

  • dataimage

  • objectcentrum

  • profile

  • linearregression

  • limits

  • components

  • origindex

setStatistics

Description:

Set statistics option on plot layer.

Syntax:

setStatistics(primary_type)

Example:

setStatistics("category"); // Show comment on object by category

primary type

  • value

  • fixed

  • none

  • index

  • identifier

  • category

  • density

  • perspective

  • matrix

  • amplitude

  • average

  • sum

  • missing

  • hotelling

  • dcrit

  • confidence

  • vector

  • predictioncategory

  • coomans

  • dataimage

  • objectcentrum

  • profile

  • linearregression

  • limits

  • components

  • origindex

setTextColor

Description:

Set text background color

Syntax:

setTextColor(color)

setTextColor(color, properties)

setTitle

Description:

Set the plot title.

Syntax:

setTitle(title)

Example:

scatter2d_plot1.setTitle("Score plot 1"); Adds the title "Score plot 1" to the plot

show

Description:

Set options for show of grid, ticks etc.

Syntax:

show(option, value)

show()

show(arg0)

Plot layer

addSubLayer

Description:

Add sub layer

Syntax:

addSubLayer(name, selection)

get

Description:

Get data by name

Syntax:

get(name)

getCount

Description:

Get layer size

Syntax:

getCount()

getSelection

Description:

Get selection from layer

Syntax:

getSelection(type)

setColor

Description:

Sets the colors for the objects of a plot layer.

Syntax:

setColor(param)

Example:

score_plot.setColor("category", 1); colours the objects in score_plot according to the class of index 1

color name parameters

  • red

  • green

  • blue

  • yellow

  • orange

  • white

  • black

  • cyan

  • darkgrey

  • gray

  • lightgrey

  • magenta

  • pink

type parameters

  • fixed

  • class

  • index

  • value

  • density

  • altitude

setComment

Description:

Set comment to a plot layer. The comment will appear when the mouse hovers over an object in the plot.

Syntax:

setComment(type)

Example:

layer1.setComment("index"); sets comment to objects of layer1 according to the index

type parameters

  • index

  • value

setDataRange

Description:

Sets which vector to plot for a given axis.

Syntax:

setDataRange(axis, type, index)

Example:

plot1.setDataRange("x", "value", 3); Plots the vector of index 3 on the X axis.

axis type parameters

  • x

type parameters

  • index

  • value

setLabel

Description:

Set labels for the objects of a plot layer.

Syntax:

setLabel(type,index[1...n],size)

Example:

layer1.setLabel("identifier", 2, 12); adds the second identifier to the objects of layer1 with a font size of 12

type parameters

  • fixed

  • class

  • index

  • value

  • identifier

setLayerName

Description:

Set layer name

Syntax:

setLayerName(arg0)

setLayerVisible

Description:

Set layer visible

Syntax:

setLayerVisible(visible)

setLayerVisible(arg0)

setLine

Description:

Set lines between the objects of a plot layer.

Syntax:

setLine(type)

Example:

layer1.setLine("index"); sets lines between the objects of layer1 according to the index

type parameters

  • index

  • value

setShape

Description:

Sets the shapes for the objects of a plot layer.

Syntax:

setShape(param)

Example:

layer1.setShape(class,1); sets the shapes for the objects of layer1 according to the class of index 1

shape names

  • circle

  • square

  • uppertriangle

  • lowertriangle

  • diamond

  • hollowcircle

  • hollowsquare

  • hollowuppertriangle

  • hollowlowertriangle

  • hollowdiamond

  • plus

  • cross

  • crossandline

  • line

type parameters

  • fixed

  • class

setSize

Description:

Sets the sizes for the objects of a plot layer.

Syntax:

setSize(param)

setSize(arg0, arg1)

setSize(arg0)

Example:

layer1.setSize(value,10,14,2) sets the objects in layer1 to sizes between 10 and 14 according the values of the vector of index 2

type parameters

  • fixed

  • class

  • index

  • value

  • perspective - 3D scatter plots

setStatistics

Description:

Set statistics option on plot layer.

Syntax:

setStatistics(type)

Example:

layer1.setStatistics("index");

Plot window

drawLine

Description:

Draw a line from the plot window

Syntax:

drawLine(coordinates)

type parameters

  • index

  • value

getArea

Description:

Get specific window area; top, left, bottom, right and center

Syntax:

getArea(option)

setBackgroundColor

Description:

Sets the background for the plot window; transparent or color code Syntax:

setBackgroundColor(color)

setBackgroundColor(color, grad color)

setBackgroundColor(color, grad color, properties)

setBackgroundColor(color)

setBackgroundColor(color, grad color)

setBackgroundColor(color, grad color, properties)

Example:

score_plot.setBackgroundColor("red"); colours the background in score_plot to red 1

color name parameters

  • red

  • green

  • blue

  • yellow

  • orange

  • white

  • black

  • cyan

  • darkgray

  • gray

  • lightgray

  • magenta

  • pink

setBorder

Description:

Sets the border for the plot window

Syntax:

setBorder(shape)

setBorder(shape, properties)

setBorder(shape, color)

setBorder(shape, color, properties)

setBorder(arg0)

Example:

score_plot.setBorder("ellipse", "red"); set ellipse border with red coloron score_plot

share name parameters

  • none

  • rectangle

  • ellipse

color name parameters

  • red

  • green

  • blue

  • yellow

  • orange

  • white

  • black

  • cyan

  • darkgray

  • gray

  • lightgray

  • magenta

  • pink

setDimension

Description:

Set dimension for the plot window

Syntax:

setDimension(numwidth, numheigth)

setFont

Description:

Set font on the plot window

Syntax:

setFont(name, style, size)

setFont(arg0)

setFontColor

Description:

Set font color

Syntax:

setFontColor(font color)

setPosition

Description:

Set position for the plot window

Syntax:

setPosition(centrumindex)

setPosition(numx, numy)

Plot area

setDimension

Description:

Set dimension for the plot area

Syntax:

setDimension(dimension)

Other0

get

Description:

Get data by name

Syntax:

get(name)

set

Description:

Set data by name

Syntax:

set(name, obj)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.