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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Smooth Contour Lines
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

sebbey

Germany
70 Posts

Posted - 06/19/2012 :  04:31:06 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Kathy_Wang

China
159 Posts

Posted - 06/21/2012 :  02:02:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Edited by - Kathy_Wang on 06/21/2012 02:09:54 AM
Go to Top of Page

sebbey

Germany
70 Posts

Posted - 08/01/2012 :  03:06:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000