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
|
|
|