Questions tagged [biplot]
46 questions
2
votes
1 answer
How to make a pretty biplot in R without using external packages?
I'm a huge fan of the typical R plots. Today I have to make a biplot, but the typical biplot are ugly. There is a way to make it prettier, draw the ellipses, etc. without using others packages?
If is not possible, how can I draw it looking as the…

Daniel Valencia C.
- 2,159
- 2
- 19
- 38
1
vote
1 answer
Plot means and sd error bars for both x and y
I would like to produce a scatterplot using ggplot that shows the means and sds of d13C on the x-axis and d15N on the y-axis for each Genus in my study. I can do the calculations and get the means and error bars in each dimension separately but I…

Jeff Stratford
- 53
- 7
1
vote
1 answer
Changing the points shape in fviz_pca_biplot
I am plotting my PCA as a biplot with
fviz_pca_biplot
but I cannot change my points to squares (pch=15).
For single group of observations I use the code as below
basic_bi_plot <- fviz_pca_biplot(res.pca, axes = c(1, 2),
…

Paulina
- 41
- 3
1
vote
1 answer
How do I label only a subset of points in a biplot?
I am generating biplots using fviz_pca_biplot in factoextra. The following code provides an example of my datset and the biplots. I'd like to label a subset of points, rather than all of them. For example, only species in a single genus like…

Nicholas George
- 87
- 6
1
vote
1 answer
biplot in R labeling by two variables?
Hello I have a multivariate dataset
I performed a PCA over my scaled data and used fviz_pca_biplot() function for displaying a biplot.
this is a example of what I did:
(example with mtcars)
colnames(mtcars)
"mpg" "cyl" "disp" "hp" "drat" "wt" …

Valentin
- 399
- 2
- 10
1
vote
0 answers
Expanding biplot scale in factoextra package
I am trying to plot a PCA model in r using "fviz_pca_biplot" from the factoextra package.
But I'm having problems making the plot big enough to show all the vectors.
Any help is welcomed.
I am using this…

ninna
- 11
- 2
1
vote
1 answer
How to plot distance biplot and correlation biplot results of SVD/PCA in R?
I searched for a long time for a straightforward explanation of the distance vs correlation biplots, as well as an explanation of how to transform the standard outputs of PCA to achieve the two biplots. All the stack overflow explanations 1 2 3 4 I…

mikeblazanin
- 85
- 5
1
vote
0 answers
How can I create a biplot with factoextra after using varimax rotation in R?
I have performed a PCA on my data set with prcomp() and then used fviz_pca_biplot() (package factoextra) to create a nice biplot (including different colors by group, in my case four different sites).
It was suggested to me to use varimax rotation…

Ja Wa
- 11
- 1
1
vote
1 answer
How to overlap two biplot with different axes using ggplot2?
I am trying to recreate the following plsr biplot:
plsr loading plots
plsr code
df.metric <- plsr(y ~ LMA + LDMC + Thick + Carbon + Nitrogen + Tough, scale
= TRUE, validation = "LOO", method = "oscorespls", data = df)
extract fungal taxa…

Tellez
- 11
- 1
1
vote
1 answer
Modify point stroke on a PCA biplot using autoplot function
I am using the autoplot function to make a PCA biplot. In my case, I would like to increase the point stroke to improve the readability of the plot. How can I do that?
Here's an example:
library(ggfortify)
df <- iris[c(1, 2, 3,…

Drosof
- 191
- 4
- 16
0
votes
0 answers
Is it possible/meaningful to split PCA results into facets by stimulus (in R)?
I am trying to quantify the reaction of animals to three different stimuli. For this I have noted the number of occurrence of different behaviors per 10 second bins for three minutes before and three minutes after stimulus onset. therefore I have…

lframond
- 101
- 1
0
votes
0 answers
How can I remove arrow labels on a PCA biplot in Python and place them outside the figure?
I am plotting pcaplots and biplots and I would like to remove the labels on the arrow and place them outside the figure. I would appreciate any help with this.
This is what I have tried so far:
cluster.biplot(cscore=pca_scores, loadings=loadings,…

maks
- 11
- 4
0
votes
0 answers
Why the legend is not in the correct order in biplot? I have 2 target variables, can I add both at one pca with two different legend?
BIPLOTI run the below code but the legend is not in the correct order.
Also, I have 2 target variables. It would be valuable if I added both variables with two legends.
from sklearn.decomposition import PCA
from sklearn.preprocessing import…

M MA
- 1
- 2
0
votes
0 answers
near-alignment of PC scores and variable vector (biplot)
Here is the screenshot of my PCA biplot. As is evident there is an alignment (although not perfect), of my PC scores and the variable vector . Is there any interpretation of this alignment?
PCA biplot
Ray
this is a question of graph interpreation,…
0
votes
1 answer
Using different scales for secondary axis for ggplot function in R
I am trying to create a biplot from iris data set using ggplot2 package. I have used below code to generate the biplot:
library(ggplot2)
library(devtools)
# Load iris dataset
data(iris)
# Run PCA and extract scores and loadings
iris_pca <-…

Farhan
- 57
- 5