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
 Origin Forum
 Problems with 3D-Surface

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
glider27 Posted - 03/18/2012 : 11:07:50 AM
Hello together,

i have problems to set my data to an 3D-Surface-Graphing.

My data are in this form, that i have variable x-datas for my z-datas, while my y-datas are also variable. In pictur i have a sample like my datas are formatted:

How can i get a 3D-surface with this changing values ??

Thanks for help



1   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 03/19/2012 : 11:25:57 AM
Hi glider27,

You first need to convert your formatted worksheet to a 
3-column XYZ worksheet, then need to convert it to a matrix. 
From a matrix, you can make a 3D surface plot. The following 
is a possible procedure:

1) Run the following script to get an XYZ worksheet: 
///////////////////////////////////////
  Bk1$=%H;  //current wks
  newbook;  //make a new wkbook
  Bk2$=%H;  //output wks
  wks.addCol();  //add a col
  wks.col3.type=6; //set as Z
  nc1=bk1$!wks.nCols/2; //col pairs
  nr1=bk1$!wks.maxRows; //rows
  ii2=0;
  for(jj=1; jj<=nc1; jj++) {  //loop for cols
    range B1x=[Bk1$]!wcol(2*(jj-1)+1);
    range B1yz=[Bk1$]!wcol(2*(jj-1)+2);
    for(ii=2; ii<=nr1; ii++) {  //loop for rows
      xx=B1x[ii];  //current x
      yy=B1yz[1];  //current y
      zz=B1yz[ii];  //current z
      range B2x=[Bk2$]!1;
      range B2y=[Bk2$]!2;
      range B2z=[Bk2$]!3;
      ii2++;
      B2x[ii2]=xx;
      B2y[ii2]=yy;
      B2z[ii2]=zz;
    }
  }
  type -b %(Bk2$) with $(ii2) rows has been created;
///////////////////////////////////////



2) Convert the XYZ worksheet to a matrix by gridding by 
  "Worksheet: Convert to Matrix: XYZ Gridding" menu.
  (You should find the best-suited gridding algorithm such as 
   "Random (Thin Plate Spline) and its parameters by some experiments)
3) Once you obtain a matrix, you can make a 3D Surface plot by e.g.,
  "Plot: 3D Surface: Color Map Surface" menu.

Hope this is helpful for you.

--Hideo Fujii
OriginLab

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