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
 Smooth Contour Lines

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
sebbey Posted - 06/19/2012 : 04:31:06 AM
Origin Ver.: 8.6.0
Operating System: Windows 7 Professional

Hi everyone,

I have a question about contour plots. Is there a way to smoothen the contour lines with a labtalk code? I know how to do it manually, but I'm not able to find a proper labtalk command. Right now my contours look pretty edgy.

Thanks in advance,
sebbey
2   L A T E S T    R E P L I E S    (Newest First)
sebbey Posted - 08/01/2012 : 03:06:15 AM
Origin Ver.: 8.6.0
Operating System: Windows 7 Professional

Hi Guys,

I recently picked up the "Smoothing Contour Lines" Topic, I had posted here a couple of weeks ago.

Kathy suggested, that I should convert my XYZ Data to Matrix Data, in order to be able to smooth my plots and extrapolate the Data.
However, the w2m X-Function should only be used if the X/Y Values in the source worksheet are uniformly spaced, which is unfortunately not the case. So I tried to use the plotvm X-function, but I wasn't even able to create any graph with my data.

In the first picture below, you can see how my dataset looks like.
In the second picture you can see the contour plot, I created with this data using the following code:

//define axes;
wks.col1.type=4;// Make Col1 type X.
wks.col2.type=1;// Make Col2 type Y.
wks.col3.type=6;// Make Col3 type Z.

//draw contour Plot
work -s 1 1 3 100; //mark columns
menu -e 35581;	   //draw contour plot






What I'm trying to is:
1) Smooth the contour lines, they look too edgy
2) Extrapolate the data. Although the maximum Value for eta(contour lines) is about 0.7, I would like to show Contour lines that go up to about 0.8.
3) I need to implement this graph/data manipulation with a LabTalk script.

Additional Question:
I found out, that its possible to extract the contour lines out of the contour plot. Is it possible to use this extracted data to somehow extrapolate the contour lines.

I hope I explained my problem well enough!
Thank you in Advance,

Sebbey
Kathy_Wang Posted - 06/21/2012 : 02:02:17 AM
Hi,

Actually, I think if you have XYZ data, it would be simpler to do the smoothing manually in the "Contouring Info" tab of the Plot Details dialog. But there is no labtalk command directly for this.

So you will need to do the smoothing with matrix, that you use the "msmooth" X function to smooth your input matrix.

For details of this X function,please refer to:

http://www.originlab.com/www/helponline/Origin/en/Programming/mergedProjects/X-Function/X-Function/Msmooth.html

If your original data is XYZ worksheet data. You could transfer it to a matrix by XYZ gridding, using the x function "XYZ2Mat":

http://www.originlab.com/www/helponline/Origin/en/programming/mergedProjects/X-Function/X-Function/XYZ2Mat.html

Note that there are several gridding methods available and you may choose one according to your need.



Kathy
Originlab

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