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
 Categorical variables in 3D plots

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
muratet Posted - 12/06/2002 : 12:39:49 PM
I'm trying to figure out a way to make a 3D plot in which the X axis is categorical (Y axis is real, Z axis is real). The available gridding algorithms don't seem to handle this case. Does anyone have a workaround, or have I missed something?

Cheers

Mike
1   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 12/06/2002 : 4:05:35 PM
Hi Mike,

If you set your X column as categorical (highlight X, go to Column menu and make sure Set as Categorical - last item in that menu - is checked), then you can make XYZ Scatter and Trajectory plots.

But you cannot take the XYZ data where X is categorical, and then convert it into a matrix because the conversion expects all numerical values.

Now, Origin internally assigns values starting from 1, for all the items in the categorical column, by first sorting the column internally and finding out how many groups there are and just assigning values from 1 in acending order.

There is access to these values from script or Origin C.
For example, if you have data1_A to be set as categorical, then just create a new column, say data1_D, and then type the following in the script window:

loop(ii,1,N);
{
data1_d[ii] = data1_a[ii];
}
where N should be replaced with length of data1_a

This will get you the numeric values associated with the categories. You can then use these numeric values in conversion etc.

Hope this helps.

Easwar
OriginLab.

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