The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Table delete

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
kdsaransh Posted - 01/23/2015 : 02:23:45 AM
Hello,

Is there a way to delete the table from the graph which is created due to fitting.

I searched wiki, but couldn't found the answer.

thanks,
6   L A T E S T    R E P L I E S    (Newest First)
DonnaKenneth Posted - 02/13/2015 : 05:03:54 AM
Thanks jasonzhao for sharing this post and informative graph in this thread.It is helpful.


jasonzhao Posted - 01/29/2015 : 03:34:31 AM
Hello,

Sorry for that method is not working. Let's check the settings you want to apply.

1. Uncheck 'Paste Results Table to Sourse Graph'
2. Check 'Apparent Fit'
3. Uncheck 'Fit Statistics' group

See the graph below:

we save the theme as 'myFitLR' for further use; then run the script below:



// GUI tree for linear fit
tree lrGUI;  
xop execute:=init classname:=FitLinear iotrgui:=lrGUI theme:=myFitLR;
//Specify all data plots on graph to be input data in the GUI tree
ii = 1;
doc -e d
{
	%A =  xof(%C);
	lrGUI.GUI.InputData.Range$(ii).X$ = %A;
	lrGUI.GUI.InputData.Range$(ii).Y$ = %C;
	setplotuid lrGUI ii; //set plot id to lrgui. pl
	ii = ii + 1;	
}

xop execute:=run iotrgui:=lrGUI otrresult:=lrOut;
xop execute:=report iotrgui:=lrGUI;
// clean up linear fit operation objects after fitting
xop execute:=cleanup; 


Best regards,
Jason Zhao
OriginLab Tech Service
kdsaransh Posted - 01/28/2015 : 01:51:57 AM
Hi ,
Many Thanks.

I had saved the theme as you said, but the table in the workbook area is still there. Am i doing something wrong...?

for(int ii = 2; ii<=n+1; ii++)
{
range rWa = [book1]sheet1!; // Define a worksheet object range
rWa.colSel(ii-1,0); // deselect col 2.
rWa.colSel(ii,1); // select column 2. 1 stands for select. If 0 stands for deselect.
plotxy iy:= [book1]Sheet1!(1,$(ii)) ogl:=[<new template:="
C:\Users\babia\Documents\OriginLab\91\User Files\ac_nonfitting.otp" name:=samplegraph>];
// renames the graph name to worksheet comment name.

page.label$ = %(1,@LC);
layer -a;

layer.x.from = 60; //Set the end value
layer.x.to = 900000; //Set the increment value
//layer.x.inc = 2;

StartRange=70;
EndRange=30000;
mks1=xindex(StartRange,%C);
mks2=xindex(EndRange,%C);

// code for linear fitting
tree lrGUI;
xop execute:=init classname:=FitLinear iotrgui:=lrGUI;

lrGUI.GUI.Fit.ApparentFit = 1;

// remove the fitted table from the graph.
lrgui.GUI.Output.PlotSettings.PasteResultTable.ThemeRsltTable$="myfitlr_notable.INI";

set %c -c 4; //Change the line's color
set %c -d 1; //Change the line's style

xop execute:=run iotrgui:=lrGUI otrresult:=lrOut;
xop execute:=report iotrgui:=lrGUI;

xop execute:=cleanup;

window -a book1;
newsheet name:=result$(ii-1);

col(A)[1]=lrOut.Summary.R1.Intercept_Value;
col(B)[1]=lrOut.Summary.R1.Slope_Value;
}
jasonzhao Posted - 01/26/2015 : 9:28:11 PM
Hello,

This can be done in a similar way:
Please open the linear fit dialog,
uncheck unwanted table group, such as Fit Statistics, then save the dialog as a theme, using the above command in script.


Best regards,
Jason Zhao
OriginLab Tech Service
kdsaransh Posted - 01/26/2015 : 2:16:41 PM
Hello,

Perfect. Thanks .

Further i also want to delete the tables that are created after the fitting in the form of workbook.

I am using "del table1" to delete the table , but i cannot. If i have to delete multiple tables, then how can i use the loop for doing so.

thanks again.
jasonzhao Posted - 01/26/2015 : 02:17:29 AM
Hello,

Please open the linear fit dialog,
uncheck Paste Results Table to Sourse Graph , then save the dialog as a theme, such as "myFitLR", then, using this command in your script:

xop execute:=init classname:=FitLinear iotrgui:=lrGUI theme:=myFitLR; 


Best regards,
Jason Zhao
OriginLab Tech Service

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000