pca with more than one grouping variable
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kim Arnold
am 14 Dez. 2021
Kommentiert: Jeff Miller
am 16 Dez. 2021
I want to do a pca plot of 20 samples I measured. For this I used gscatter. However, I want
1) to color my samples with 7 colors for the different type of organisms i measured and in addition
2) I want to give symbols for another variable called, dead or alive where I want to use square for dead and triangles for alive
How can I create a pca plot showing what I described above? do I need to use something else than gscatter?
0 Kommentare
Akzeptierte Antwort
Jeff Miller
am 14 Dez. 2021
gscatter will accept multiple grouping variables, in your case organism & dead/alive. There is an example in the gscatter documentation--search for "Scatter Plot with Multiple Grouping Variables". I believe you specify 14 colors and 14 symbols for your 7*2=14 combinations of the two grouping variables.
4 Kommentare
Jeff Miller
am 16 Dez. 2021
Hi Kim,
You are welcome. That does sound pretty complicated, so extra-good that you got it working.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Dimensionality Reduction and Feature Extraction finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!