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
 Origin Forum
 contour plot with non equidistant steps
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

tonyv

Germany
Posts

Posted - 05/09/2007 :  08:10:23 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin):
Operating System:
Origin Version (Select Help-->About Origin):
Operating System:

Hi

Is it possible to plot in Oringin contour plot with non equidistant steps?

Thank you

Tony

larry_lan

China
Posts

Posted - 05/09/2007 :  08:56:20 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
No. But you can convert to evenly spaced matrix first by Random XYZ gridding. (Edit : Convert to Matrix : Random XYZ)

Larry
OriginLab Technical Services
Go to Top of Page

tonyv

Germany
Posts

Posted - 05/09/2007 :  09:17:53 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you but I can not do a XYZ matrix.
The data is in 30-40 columns, which should be converted to a direct Matrix in order to make a contour plot.

Go to Top of Page

larry_lan

China
Posts

Posted - 05/09/2007 :  11:54:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Tony:

I suspect your data may looks like:



If so, since the data is not uniform spaced, you can not use direct matrix conversion method. However, you can try this script to transform to XYZ data frist:


%S=%H;
nr = wks.maxrows;
nc = wks.ncols;
window -t data origin;
%O=%H;
wks.addcol();
wks.col=3;
wks.col.type=6;
nn=1;
for(ii=2; ii<=nc; ii++)
{
for(jj=2; jj<=nr; jj++)
{
%(%O, 1, nn) = %(%S, jj, 1);
%(%O, 2, nn) = %(%S, 1, ii);
%(%O, 3, nn) = %(%S, jj, ii);
nn++;
};
};


Then you will get a new worksheet data, the X, Y, Z values are placed in one column, like:



After that, highlight the Z column of the new worksheet, and select Edit : Convert to matrix : Random XYZ to convert the data to matrix. Then you can plot a contour.

Larry
OriginLab Technical Services
Go to Top of Page

tonyv

Germany
Posts

Posted - 05/09/2007 :  1:10:38 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply

This is exactly what I need. Thank you!

But, I have experience only with OriginC and no idea how to start this script.

Go to Top of Page

larry_lan

China
Posts

Posted - 05/09/2007 :  9:06:43 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can see how to run a script from here:

http://www.originlab.com/www/support/resultstech.aspx?language=english&ID=655

http://www.originlab.com/www/support/resultstech.aspx?ID=1056&language=English&Version=7.5

A more direct way is, active the source worksheet, paste the script on your script window (Window : Script Window). Highlight all the script and press Enter.

Larry
OriginLab Technical Services
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