Skip to content

Commit

Permalink
Update pathway_pca.R
Browse files Browse the repository at this point in the history
  • Loading branch information
cafferychen777 committed Jan 18, 2024
1 parent e48e475 commit 63fab9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/pathway_pca.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#' group = factor(rep(c("Control", "Treatment"), each = 5)))
#'
#' # Define custom colors for PCA plot
#' custom_colors <- c("blue", "red")
#' custom_colors <- c("skyblue", "salmon")
#'
#' # Generate PCA plot with custom colors
#' pca_plot <- pathway_pca(kegg_abundance_example, metadata_example, "group", colors = custom_colors)
Expand Down Expand Up @@ -70,7 +70,7 @@ pathway_pca <- function(abundance,

# Create a ggplot object for the PCA scatter plot
Fig1a.taxa.pca <- ggplot2::ggplot(pca,ggplot2::aes(PC1,PC2))+
ggplot2::geom_point(size=2,ggplot2::aes(color=Group),show.legend = T)+
ggplot2::geom_point(size=4,ggplot2::aes(color=Group),show.legend = T)+
ggplot2::scale_color_manual(values=colors)+
ggplot2::stat_ellipse(ggplot2::aes(color = Group),fill="white",geom = "polygon",
level=0.95,alpha = 0.01,show.legend = F)+
Expand Down

0 comments on commit 63fab9c

Please sign in to comment.