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
 Change the order of an categorical y-axis
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Kolzau

1 Posts

Posted - 11/12/2011 :  10:03:50 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8 SR4
Operating System: Win7

Hi,

as i stated in the topic i would like to change the order of the categorical y-axis ticklabels.
My data looks like:

Date Category
01.02. A
02.02. B
03.02. A
04.02. C
05.02. D
06.02. B
... ...

I dont want it to be in alphabetical order, but in an specified order. Is that possible.

Thanks in advance


Hideo Fujii

USA
1582 Posts

Posted - 11/16/2011 :  4:18:19 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Kolzau,

Maybe you can double recoding. Let's say you want to order your categories 
in C->D->A->B. First, you can map {A, B, C, D} to {3, 4, 1, 2}, 
then, you can map {1, 2, 3, 4} to {C, D, A, B}. 
To do so, you can do the following: (assume your original data 
is in A(X) and B(Y))

1) For the first mapping, add an extra column C(Y), and recode your 
  categories in B(Y) by e.g., nesting conditional operators in 
  Set Column Values tool: e.g., 
  col(B)$=="A"?3:col(B)$=="B"?4:col(B)$=="C"?1:col(B)$=="D"?2:99
2) For the second mapping, add extra column D(Y), and put the categories 
   there in the order you want in this case {C, D, A, B}. 
3) Make a plot of C(Y) against A(X).
4) In Y Axis dialog box, choose "Tick Labels" tab, and set the 
   Type to "Text from Dataset", and Dataset to the column D.



Hope this works.

--Hideo Fujii
  OriginLab
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