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 |