3.3.2.57.1 Options for Columns


no option

Syntax: set no option name

Open the Plot Details dialog box for name. For example:

Set %C; //Open Plot Details

-at

Syntax: set name -at value

Do not save the dataset with the project. When name is a dataset and value = 1, the dataset is not saved with the project. When value = 0, the dataset would be saved. This works even you reopen the project.

set book1 -at 1; //workbook "Book1" would not be saved with the project.

-b

Syntax: set name -b value

Set the beginning of the display range on a worksheet or on a data plot (value equals the row index number). Those undisplayed range would shown as blank. When value = 1, set beginning of display range to Auto.

  • If name is a worksheet, the display range affects both the worksheet and the data plots of all datasets in the worksheet.
  • If name is a dataset, only the data plot display range is affected.
range rr = [Book1]Sheet2!B; 
set rr -b 3;         //The data in col(B) in Book1 sheet2 starts to display from
                     //row 3 and first two cells will be shown as blank

-b3o

Syntax: set name -b3o value

Set the start value from which the 3D Bars are drawn. This option applies to both XYZ/Matrix 3D Bar and XYY 3D Bar. It supports 2 values, 0 and 1. zero means the bars will start at Z = 0 and draw up if positive and down if negative. 1 means the bars will draw from the minimum Z value if any negative values exist.

set %c -b3o 0; //set the start value of the current selected 3d bar plot to be drawn from 0.

-bs

Syntax: set name -bs value

Temporarily set the beginning of the range of a dataset to the index given by value. This command is used with datasets to allow functions (such as Sum()) to work on a subset of a dataset. Its temporary effect switches off with any window refresh.

set col(A) -bs 5;
col(B)=sin(col(A)); //set value of col(B) by col(A) with first 4 rows blank

-dc

Syntax: set name -dc value

Set the dataset as categorical (0 = data is not categorical, 1 = data is categorical).

See wks.col.categorical.type

-e

Syntax: set name -e value

Set the end of the worksheet display range (value equals row index number). The data outside the end range is not changed, only hidden. See also -em and -ez.

set [book1]sheet1! -e 10;

-e

Syntax: set name -e -1

Reset the data plot to display full data range. Example:

range r1 = [Graph1]Layer1!1;
set r1 -e -1;

In order to view the effect of this command, some data points should be excluded from display in the data plot. Refer to the set -b and set -e option switch.

-em

Syntax: set name -em value

Set the end of the worksheet display range. When value = 0, set all data to missing values. value equals last index number. When value = 0, all data are set to missing value. When value > 0, the data outside the end range is not changed, only hidden. See also -e and -ez.

//fill book1 sheet1 column with row numbers
set [book1]Sheet1! -em 0; // all data are hidden
set [book1]Sheet1! -em 10; // only 10 rows are show with missing value

-er

Syntax: set name -er value

Set the number of rows available on the named worksheet. This command is used with a worksheet only. Data out of the range is deleted.

set [book1]sheet2! -er 20;

-es

Syntax: set name -es value

Temporarily set the end of the range of a dataset to the index given by value.This command is used with datasets to allow functions (such as sum()) to work on a subset of a dataset. It temporarily switches off with any window refresh.

-ez

Syntax: set name -ez value

Set the end of the worksheet display range. When value = 0, set all data to zero.Value equals last index number. When value = 0, all data is set to zero. When value > 0, the data outside the end range is not changed, only hidden. See also -e and -em.

-f

Syntax: set name -f xvalue

Set the corresponding X value for the first data point. Use with set -i to create an associated X dataset.

-f1

Syntax: set name -f1 xvalue

Set the function to plot from xvalue.

-f2

Syntax: set name -f2 xvalue

Set the function to plot to xvalue. You must call -f2 to clear the Auto X Range check box. To select the Auto X Range check box, use: set funcname -f2 (0/0);

-hbb

Syntax: set name -hbb value

Set the begin value(lower limit) of the histogram bin data.

-hbe

Syntax: set name -hbe value

Set the end value(upper limit) of the histogram bin data.

-hbs

Syntax: set name -hbs value

Set the histogram bin size.

-i

Syntax: set name -i xinc

Set the X increment for the dataset. You cannot use this option if there are already X values associated with the dataset.

newbook;
wks.ncols = 1;
wks.col1.type=1; //new a worksheet with only one Y column
csetvalue formula:="i" col:=1; //Fill the column with row number
set col(A) -i 3;
set col(A) -f 2; //Set the corresponding X values
wks.colSel(1,1);
worksheet -p 200; //Graph a line plot

-it

Syntax: set name -it dataTypeValue

Set the internal data type for the name dataset or matrix to the value dataTypeValue. For example, to set the internal data type of the active dataset held in %C to double, use:

set %C -it 0;

Possible values for dataTypeValue are the same as the values of the constants defined in the oc_const.h Origin C header file (located in the \OriginC\system subfolder):

FSI_DOUBLE = 0
FSI_REAL = 1
FSI_SHORT = 2
FSI_LONG = 3
FSI_CHAR = 4
FSI_TEXT = 5
FSI_MIXED = 6
FSI_BYTE = 7
FSI_USHORT = 8
FSI_ULONG = 9
FSI_COMPLEX = 10

If %C is a column in a worksheet, then only a Numeric column is supported and only types FSI_DOUBLE, FSI_REAL, FSI_SHORT, and FSI_LONG are supported. If %C is a matrix, then all these constants are supported. However, FSI_TEXT and FSI_MIXED should be avoided for a matrix.

-set

Syntax: set datasetname -set value

Set Text & Numeric datasets to show numeric values as text elements (value=1) or numeric (value=0).

-set also affect the Never convert text to numeric during data entry checkbox in The (Column Properties) Properties Tab. You can type a digit string in column A after the script execute:

range rr = !A;
set rr -set 1;
//The digit string will be shown as text
//"Never convert text to numeric during data entry" will be checked
range rr = !A;
set rr -set 0;
//The digit string will be shown as numeric with scientific notation
//"Never convert text to numeric during data entry" will be unchecked

This command set the format of digit string typed/pasted into column A in current book (current sheet) as text after the command execute. In addition, the command will not change the digit string to text entry at before, only string entry in afterwards.

Minimum Origin Version Required: Origin 2015 SR0