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
 Change the order of an categorical y-axis

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
Kolzau Posted - 11/12/2011 : 10:03:50 AM
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


1   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 11/16/2011 : 4:18:19 PM
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

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