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
 plotting non-adjacent columns

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
tcoates Posted - 07/19/2006 : 8:13:18 PM
Origin Version (Select Help-->About Origin): 7.0
Operating System:XP
Am just learning LabTalk ..i am sure this is simple ..but im stuck ...

I want to do the following:

Select an x and y column from a worksheet that are non-adjact
do a scatter plot
Smooth the plot (savitsky-golay order 3 =/-10)
get rid of the original data and display only the smoothed data.

also, the smoothed data fits in the same range -3 to +3 but the raw data doesnt. i want the plots to all have teh same x and y range .. after smoothing, the plot recalcultes and is not the same as teh template.

where i am stuck at the moment is selecting teh non-adjacted columens

worksheet -s 2 0 17 0 seemes to select all cols from 2 to 17
worksheet -p 201 pops up a dialog for me to assign the x and y cols. .. i want this to happen automatically ..

would appreciate any help ...
thanks

tom
1   L A T E S T    R E P L I E S    (Newest First)
Deanna Posted - 07/19/2006 : 11:03:17 PM
Hi, Tom.

To select two columns that are not ajacent, you can use the wks.colSel(ColumnIndex). This command adds a column to the current selection. For example, you can use the following code to select Column 2 and Column 17:

wks.colSel(2);
wks.colSel(17);


If the current column selection is fine, ploting with the command

worksheet -p 201

should not cause the dialog to pop up. Please try this again.

Here is an example to perform the savitsky-golay smoothing. It assumes that the names of the X column, data column and result column are Index, Data, and Result.
curve.data$=%h_Data; 
curve.x$=%h_Index;
curve.result$=%h_Result;
curve.polydeg=3;
curve.smoothleftpts = 5;
curve.smoothrightpts = 5;
curve.smoothpts =20;
curve.SGSmooth();

I think this short script can be able to help.

In your case, I don't think plotting the original data and removing from the graph is necessary. Since we can do the smoothing on the worksheet, I think we can plot the smooth result only.

If you have any more problems, please share with us. We will be more than happy to help. :)

Deanna
OriginLab GZ Office

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