Author |
Topic |
|
muratet
USA
1 Posts |
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 |
|
easwar
USA
1964 Posts |
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. |
|
|
|
Topic |
|
|
|