Entering edit mode
4.6 years ago
evelyn
▴
230
Hello,
I am making PCA
cluster plots. I am using different colors for each cluster. I am making PCA for two different vcf files for the same dataset and want to keep same colors for each of the clusters e.g., green for cluster 1
for both graphs. I am not sure how to keep the colors consistent throughout several graphs for each cluster.
I will appreciate any help. Thank you!
I am sorry... you will have to explain better what you want to do. Which program(s) are you using? Which input data are you using? Please paste examples of your code and data, if possible.
I am using
DAPC
. Here are a few lines for my input:I am using this code to make the graph:
I am making two graphs using the same colors.
I want to make Cluster 1 as darkblue color, Cluster 2 as purple color and Cluster 3 as green color in both graphs.
Which package in R are you using? - adegenet?
Yes, I am using adegenet.
Thank you. Can you please show the full sequence of commands that you are using?
Here is the full sequence of commands that I am using:
I have not used these functions in the past. Nevertheless, are you sure that you are using the
col
parameter correctly when passing it toscatter()
? - does it not have to be the same length as your input variables?So I have three clusters for my data and that is the reason I am using only three colors for scatter. I am just not sure how can I keep them consistent over different graphs from the same dataset.