Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(ggplot2)
- library(GGally)
- #Function that returns a parallel coordinates plot
- PF1_PCPCRG <- function(datafile, title) {
- returnplot <-
- ggparcoord(
- # The Data file
- datafile,
- # Which columns from data file to use in the plot
- columns = c(3,8,56,9,69,42,43,38,29,30,31,6,36,146),
- # Which column to use for coloring data
- groupColumn = 3,
- # Do not show points
- showPoints = FALSE,
- # Turn on alpha blending for dense plots
- alphaLines = 0.6,
- # Turn off box shading range
- shadeBox = NULL,
- # Will normalize each column's values to [0, 1]
- scale = "std" # try "std" also
- ) +
- # Decrease margins
- scale_x_discrete(expand = c(0.02, 0.02)) +
- scale_y_continuous(expand = c(0.02, 0.02)) +
- # Plot ttitle
- ggtitle(title)
- }
- # ------------------------------------------------------------------------------------------------
- # ------------------------------------------------------------------------------------------------
- #1 PC plot
- p_PCP <- PF1_PCPCRG (EndData5v6WS, "PC Plot")
- p_PCP
Add Comment
Please, Sign In to add comment