Questions tagged [ggbiplot]

A biplot based on ggplot2.

This tag refer to the library ggbiplot on github for the programming language. One can install it with:

library(devtools)
install_github("vqv/ggbiplot")

It allows to plot Principal Component Analysis using ggplot (see ).

107 questions
1
vote
1 answer

Identify Principal component from Biplot in R

I'm doing a principal component analysis, after I got the analysis result, how to identify the first couple of principal predictors? As it is messy from the plot. It's hard to see the predictors names: Which part of the PCA results should I look…
Demo
  • 291
  • 1
  • 5
  • 16
1
vote
1 answer

Warning message from ggfortify::ggbiplot

I am trying to use ggbiplotfrom ggfortify package. It seems its working fine but I am getting warning message as follows, mdl <- pls::plsr(mpg ~ ., data = mtcars, scale = T) scrs <- data.frame(pls::scores(mdl)[]) loads <-…
TheRimalaya
  • 4,232
  • 2
  • 31
  • 37
1
vote
0 answers

Include colour ramp in PCA plot using ggbiplot

I am trying to re-create a PCA plot that I've made previously here, but have since lost the code which I used to make it: https://i.stack.imgur.com/bMh6m.jpg In this plot above I was able to group individuals by both their "Location" (different…
MattQ
  • 43
  • 4
1
vote
2 answers

R ggbiplot aesthetics

is it possible to change the thickness of the ellipses (incl circle) in ggbiplot? The arguments don't seem to have that option. Is there another way around it? So far I've dealt with this issue by making my data points more transparent.
val
  • 1,629
  • 1
  • 30
  • 56
1
vote
1 answer

Error encountered: Plotting PCA figure via ggbiplot

I am very new to R and trying to plot a PCA figure of my data using ggbiplot. So please bear with me if my question does not make any senses to you. Basically, I was following the tutorial I found here, except I was using my own data set. Everything…
A.Chiu
  • 11
  • 3
1
vote
0 answers

ggbiplot - how to change colour of vectors

Is it possible to change colour of the variables (vectors and their names) shown in ggbiplot? There is such option for observations, but I cannot find one for variables. Thanks.
user27241
  • 201
  • 3
  • 10
1
vote
1 answer

how can I change the legend for ggbiplot?

Actually I am trying to plot PCA by this package but when I plot the loading, I cannot change the legend as I wish (e.g. if I want to set the legend to (+)M it shows something else. what I do is as follows:…
user1267127
1
vote
3 answers

ggbiplot removal of background

Hi I have made a ggbiplot with the example given in the package. I would like to know if it's possible to remove the grey background. library(ggbiplot) data(wine) wine.pca <- prcomp(wine, scale. = TRUE) print(ggbiplot(wine.pca, obs.scale = 1,…
user3637348
  • 29
  • 1
  • 5
1
vote
0 answers

Changing the font size in autoplot and tracks functions

I am using the tracks function from ggbio package, but I am unable to change the size in the x axis. The df dataframe: chr start end id chr12 72065147 72204484 ENSBTAG00000045751 chr12 72529373 72690449 ENSBTAG00000047181 chr12…
user3091668
  • 2,230
  • 6
  • 25
  • 42
1
vote
1 answer

plotting PCA using ggbiplot and changing legend markers

In the following line of code, voc.pca is a princomp object: plot <- ggbiplot(voc.pca, pc.biplot=TRUE, obs.scale=1,var.scale=1, groups=em$VALENCE) + labs(color="Valence"). I need to display the plot in black and white. So I need to change the 3…
Pauline
  • 11
  • 3
1
vote
1 answer

ggbiplot - change the axes value

The current ggbiplot (code below) shows X axis values from -5 to 5 and Y axis from -4 to 4. How can I change it so it will be X axis values from -6 to 6 and Y axis from -6 to 6? Thanks. Code: library(devtools) install_github("ggbiplot",…
lroca
  • 621
  • 2
  • 8
  • 19
1
vote
2 answers

change legend title in ggbiplot

I'm having trouble manipulating ggbiplot such that I can specify what the title of the legend is. Using the package data: library(ggbiplot) data(wine) wine.pca <- prcomp(wine, scale. = TRUE) p <- ggbiplot(wine.pca, obs.scale = 1, var.scale = 1,…
Nick Crouch
  • 301
  • 3
  • 14
0
votes
1 answer

Keep mean points only for individual-groups in {factoextra} PCA biplot

I use the iris dataset as an example. I have set mean.point-TRUE which gives mean points for setosa (red round), versicolor (green triangle), virginica (blue square) as well as the factors (steelblue dot). I wish to make the steelblue dot to not…
Ginko-Mitten
  • 304
  • 1
  • 11
0
votes
1 answer

Change legend and shape in ggbiplot pca

can you please help me with my pca? I would like to change the shapes in that way that each species has a different color and all 2-3 organisms for each species have 2-3 different symbols. It should look like this: enter image description here So…
Scio
  • 9
  • 3
0
votes
1 answer

Incorrect number of dimensions in metaMDS and scores (biplot, NMDS ordination) in R

I am trying to make a biplot in R using the vegan package: shared_tbl <-read_tsv("data/andok.shared") my data is like this…
vicey
  • 13
  • 3