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
 color change in PCA

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
xianqian1219 Posted - 08/11/2015 : 4:10:26 PM
Hi there,

I am a beginner on Origin. I am now performing a PCA on a large set of data. It turns out that all the data points are in the same color. How do I change the colors into groups, e.g. divide all the data points into small subgroups with each subgroup has their own color?

Thank you very much for your help.

Xianqian

xianqian
6   L A T E S T    R E P L I E S    (Newest First)
Echo_Chu Posted - 08/18/2015 : 11:04:38 PM
Hi, Xianqian

I am wondering whether you already have group column in your source data?

If yes, you can just copy and paste your group column next to the data for score plot and make the score plot color index to the column

The steps can be as below

1. Add a new column to sheet Score Data
2. Copy and paste the group column there
3. Single click on the Score Plot on result sheet to open the embedded graph
4. Double click on the score plot to open the Plot Details dialog
5.Select Symbol tab in the right panel. Set Symbol Color index to the new group column, column G as the image below



Echo
jasonzhao Posted - 08/13/2015 : 10:06:16 PM
Hi,

Please set the column(C) in this way:

(i<=6)*1+(i>6&&i<=11)*2+(i>11)*3


Then also set col(C) as symbol color for column B as mentioned above.

Best regards!
Jason
OriginLab Technical Service
xianqian1219 Posted - 08/13/2015 : 6:16:34 PM
Hi Jason,

Thanks again for your help. But what you showed here is to change color directly on the score plot itself. The problem is that I have a large set of data and they all spread out and overlapped. So it is hard for me to select a perfect region to cover the desired data points. What I want to do here is to set the color for groups before the score plot is generated, if that's possible. Using the example you gave me, what I want is as following. No.1-6 is the first subgroup and color it black, No.7-11 color it green and No.12-16 color it red. Hope I made myself clear enough. Is there any way to make this work?

Thank you very much.

Lin
jasonzhao Posted - 08/12/2015 : 11:11:30 PM
Hello,

To create the graph shown above, you shall
1. copy data of PC1 and PC2 to another sheet, from the 'Score Data Sheet'. add an extra column beside the column B, right click the column and select Set Column Values, enter the formula in input dilaog, change the recalculate mode to menu, click OK to apply.

((col(b)<i>!=0))?1:col(c)



2. make a Sctter plot with the new book (Book1), double click the scatter th open the plot properties, change the color into Col(C), click OK.
Active the graph, Select Gadget: Cluster to open the gadget, then select the region you want to change color, click Mask button

3. Active the work sheet, click the yellow lock on the top right corner of column and select Recalculate.
4. Active the graph again,click unmask button, move the region to next parts of the graph, click Mask again,
then change the formula in Set value dialog into:

((col(b)<i>!=0))?3:col(c)

5. Active the graph again,click unmask button, move the region to next parts of the graph, click Mask again,
then change the formula in Set value dialog into:

((col(b)<i>!=0))?4:col(c)

Active the graph again,click unmask button

You can continue to set more color in this way, the finished graph will be like this.




Best regards!
Jason
OriginLab Technical Service
xianqian1219 Posted - 08/12/2015 : 11:49:15 AM
quote:
Originally posted by jasonzhao

Hello,

Which kind of PCA graph do you like to have multiple color?

Do you want graph like this?



Best regards!
Jason
OriginLab Technical Service




Hi Jason,

Thank you very much for your response. Yes, the one you showed here is what I want. I would really appreciate it if you can give me more directions.

Thanks.

Lin
jasonzhao Posted - 08/11/2015 : 10:55:04 PM
Hello,

Which kind of PCA graph do you like to have multiple color?

Do you want graph like this?



Best regards!
Jason
OriginLab Technical Service

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