3.3.2.65.4 Options for PlotWorksheet_Options_for_Plot
-p
Syntax: worksheet -p n template
Plot the current worksheet selection in the nth graph type into the template. Opens the Select Columns for Plotting dialog box if there is no current worksheet selection. Plots into the ORIGIN.OTP template if no template is specified. Possible n values are listed in the Plot Type IDs table.
Certain templates are included with the Origin software, and the template name is provided where applicable. You are not restricted to using the Provided Template.
// Fill col(A) and col(B) with Row #s
worksheet -s 1 7 2 14; // Select 8 pairs of data, see -s command for more detials
worksheet -p 201; // Create a scatter plot with selected 8 data point.
// Fill col(A) and col(B) with Row #s and col(C) with random #s
worksheet -s 1 0 3 0; // Select all 3 columns
worksheet -p 214 StackAreaP; //create a 100% Stacked Area plot
worksheet -p 112 ellipse; //create an ellipse plot
Generator some data and plot a XY-Error Scatter with selected data range.
newbook;
worksheet -a 1; // add a new column
wcol(1) = data(0,100,1);
wcol(2) = (wcol(1)^2)-20*wcol(1)+3;
csetvalue formula:=10*abs(grnd())+2 col:=3;
wsort bycol:=3 c1:=3 c2:=3; // sort col(C)
for (ii=1; ii<=wks.ncols; ii++)
{
switch (ii)
{
case 1 2:
worksheet -n $(ii) Data$(ii); // remane col(A) and col(B)
break;
case 3:
worksheet -t $(ii) 3; // set col(C) as Y-Error
worksheet -f $(ii) 1; // set col(C) type to be Numeric
worksheet -fd $(ii) 2; // set the number of decimal digits in col(C) be 2
worksheet -n $(ii) YError; // rename col(C)
break;
default:
break 1;
};
};
worksheet -v XError; // create a new column "XError"
csetvalue formula:=10*abs(grnd()) col:=4;
worksheet -t 4 7; // set it type to be X-Error
worksheet -s 1 6 4 10; // Highlight cell(6,1) to cell(10,4)
worksheet -p 201; // Plot a scatter
-pa
Syntax: worksheet -pa ? template
Plot data in current worksheet/workbook into the specified cloneable template if the data structure matches up with template. Note: the template must be a cloneable template to make this command work.
// With desired worksheet/workbook window active
worksheet -pa ? My3DScatter; // Plot data in current sheet into My3DScatter.otp
worksheet -pa ? "E:\\My3DScatter.otp"; // Plot data in current sheet to a cloneable template saved in E drive
//loop over everysheet in workbook. plot the sheet with user-defined template and rename graph window name with preset names in template
doc -e LB //loop over all sheets
{
worksheet -pa ? doubleY2; //plot with cloneable template
win -rp %H strNewName$;//rename graph window name with preset names in tempalte
}
-pc
Syntax: worksheet -pc plottype template startcolInd increment
Plot data by specifying the start column and increment in the current worksheet.
Start column startcolInd, plot every increment columns in the current workbook in the nth graph type plottype into the specified template template. Other columns are skipped. If a negative increment is specified, Origin will span the whole worksheet and evenly pick the total number of -increment columns to plot.
Note: possible plottype values are listed in the Plot Type IDs table. Certain templates are included with the Origin software, and the template name is provided where applicable. You are not restricted to using the Provided Template.
// With desired worksheet window active
worksheet -pc 201 Scatter 2 3; //col(2), col(5), col(8), col(11)... should be plotted into Scatter.otpu
worksheet -pc 200 line 2 -3; //start from col(2) and pick 3 columns to plot.
|