Questions tagged [biplot]
46 questions
3
votes
1 answer
How to display observations in pca biplot?
I'm hoping to display observation row names on a principal component analysis biplot using the factoextra package.
library(factoextra)
## organize dataset to obtain unique rownames
iris$id <- rownames(iris)
iris$id <- paste(iris$Species, iris$id,…

interestedindata
- 139
- 8
3
votes
2 answers
Add legend to scatter plot (PCA)
I am a newbie with python and found this excellent PCA biplot suggestion (Plot PCA loadings and loading in biplot in sklearn (like R's autoplot)). Now I tried to add a legend to the plot for the different targets. But the command plt.legend()…

Jael
- 369
- 1
- 4
- 13
3
votes
1 answer
R: How to use ggbiplot with pcaRes object? plot PCA results of data with missing values
I usually perform Principal Component Analyses with the prcomp function, and plot the results in a fancy way with ggbiplot (or otherwise just with ggplot2 extracting pca.obj$x).
Like…

DaniCee
- 2,397
- 6
- 36
- 59
3
votes
1 answer
How to change font size of species labels in vegan's biplot() function
I am trying to create a series of publishable biplots of a PCA on insect abundance in different strata (tree canopy and understory) of forests. I am doing this using the rda() function. To create the plot, I am using vegan's biplot() function and do…

Lukas
- 31
- 1
- 4
2
votes
1 answer
Biplots in matrix format using pca
This is a snippet of my dataframe:
species bill_length_mm bill_depth_mm flipper_length_mm body_mass_g predicted_species
0 Adelie 18 18 181 3750 Chinstrap
1 Adelie 17 …

Brie MerryWeather
- 132
- 3
- 13
2
votes
2 answers
How to assign colors for variables in "fviz_pca_biplot" from the R package "factoextra"?
I am trying to assign different colors for variables in a PCA biplot. However, fviz_pca_biplot from the R package factoextra can not plot the correct color for each variable.
library(factoextra)
data(iris)
res.pca <- prcomp(iris[, -5], retx =…

Yang Yang
- 858
- 3
- 26
- 49
2
votes
1 answer
Changing shapes on Factoextra
I'm a very new coder looking to change the shapes of my PCA Biplot. My PCA Biplot code is as follows:
group <- c(rep("SHIME 1_Trt1", times=8), rep('SHIME 1_Trt2', times=6),
rep("SHIME 2_Trt1", times=8), rep('SHIME 2_Trt2', times=6),
rep("SHIME…

Coldgrad
- 59
- 7
2
votes
2 answers
How to remove the observations (sample) in a biplot (PCA)
I would like to know how to remove the observations in my biplot (the black numbers in the background in my graph) and only keep the red arrows (variables).
This is my biplot:
biplot(x=pca, choices=1:2)

Aimz
- 33
- 1
- 4
2
votes
1 answer
text label for specific point in biplot R
library('factoextra')
data('mtcars')
pca.cars <- PCA(mtcars)
gg <- factoextra::fviz_pca_biplot(X = pca.cars,
# samples
fill.ind = mtcars$vs , col.ind = 'black',
…

JORIS
- 59
- 7
2
votes
1 answer
Vegan RDA and biplot, remove values contributing >10% of variance
I am using the vegan package to do RDA and want to plot the data using biplot. In my data I have hundreds of values. What I would like to do is limit the variance explained to a set limit so in the example below to 0.1. So instead of having 44 of…

HaydenC
- 107
- 4
2
votes
1 answer
Visualizing PCA with large number of variables in R using ggbiplot
I am trying to visualize a PCA that includes 87 variables.
prc <-prcomp(df[,1:87], center = TRUE, scale. = TRUE)
ggbiplot(prc, labels = rownames(df[,1:87]), var.axes = TRUE)
When I create the biplot, many of the vectors overlap with each other,…

melbez
- 960
- 1
- 13
- 36
2
votes
1 answer
Biplots for Functional Principal Component Scores
I'm trying to get the biplots between two F. principal components (or harmonics). I provide an example from fda package doc. to solve the riddle:
library(fda)
#BASIS FUNCTIONS
daybasis65 <- create.fourier.basis(c(0, 365), nbasis=65,…

fina
- 429
- 4
- 12
2
votes
0 answers
Correlation loading plot from PLSR with observations using ggplot2
I am investigating the correlation between sensory data and chemical measurements using PLS regression from the pls package. Ultimately, I want to display the results in a correlation loading plot as illustrated by the example below. So far I…

Drosof
- 191
- 4
- 16
2
votes
1 answer
Plotting PCA biplot with autoplot: modify arrow thickness
I am using the autoplot function from ggfortify as illustrated by the code below using iris.pca. This example only has three variables (hence 3 loadings) but my data set has a lot more variables so I wish I could reduce the size of the arrows to…

Drosof
- 191
- 4
- 16
2
votes
1 answer
Correlation and Distance biplot using autoplot?
With an example provided by R (USArrests), I would like to ask if anyone can tell me what the scaling in the autoplot induces? I am familiar with a distance and correlation biplot as described in Borcard et al. (2011). The autoplot function makes…

H.F.S C.
- 99
- 5