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
 3D graph
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

perfectfive

China
Posts

Posted - 03/05/2008 :  05:17:57 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System:Xp


How to plot the 3D graph with hundreds of sets of data(xyz)?

larry_lan

China
Posts

Posted - 03/06/2008 :  01:05:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi:

In Origin, 3D graph should plot from a matrix.

Suppose you have multiple worksheet data and there are three columns, XYZ in each worksheet, you can try this script (in Origin 7.5) to convert worksheet data into matrix and plot 3D wire frame graph.

// Execute the given script for all worksheet
doc -e w
{
// Convert worksheet data into matrix
mat.grid.nmatcols = 32;
mat.grid.nmatrows = 32;
mat.grid.grsize = 4;
mat.grid.gcsize = 4;
mat.grid.average = 0;
mat.grid.minquadra = 3;
mat.grid.radius = 2;
mat.grid.dcluster = 3;
mat.grid.smooth = .8;
mat.xcol = 1;
mat.ycol = 2;
mat.zcol = 3;
mat.wksname$ = %H;
sum(wcol(mat.xcol));
xmax = sum.max;
xmin = sum.min;
limit -r xmin xmax 8;
sum(wcol(mat.ycol));
ymax = sum.max;
ymin = sum.min;
limit -r ymin ymax 8;
win -t m;
matrix -ps x xmin xmax;
matrix -ps y ymin ymax;
mat.matname$ = %H;
mat.grid(coo);

// Plot wire frame.
worksheet -p 242 wirefrm;
};

We have released Origin 8 now. Worksheet to Matrix conversion in Origin 8 will be more easy. For example:

// Execute the given script for all worksheet
doc -e w
{
// Convert worksheet data into matrix using X-Function
xyz_renka 3;
};
// Execute the given script for all matrix
doc -e m
{
// Plot 3D wire frame.
worksheet -p 242 wirefrm;
};


Before running this script, please try two or three datasets for testing, because converting hundreds of worksheet into matrix is slow.

Thanks
Larry
OriginLab Technical Services
Go to Top of Page

perfectfive

China
Posts

Posted - 03/12/2008 :  03:55:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you Larry!

Perhaps I find a simple method.I add a space between the set data(xyz).
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