gg_scatter: Scatter plot with color directed by PCA

Description Usage Arguments Examples

Description

Draw a scatter plot and color the points along the principal components. Color direction becomes the data spread the most.

Usage

1
2
3
gg_scatter(data, mapping = aes(), col_low = "#0091ff",
  col_high = "#f0650e", alpha_focus = FALSE, alpha_range = c(0.05,
  0.25), alpha = 1, global = TRUE, ...)

Arguments

data

data frame to be plotted.

mapping

aesthetic mapping. Since this function automatically colors the points, just specify only x and y.

col_low

low end of the gradient.

col_high

high end of the gradient.

alpha_focus

If TRUE; transparency let dense points visible

alpha_range

range argument of [scale_alpha]

alpha

Set alpha parameter at one value

global

give aes mapping in the global ggplot environment.

...

Additional parameters for geom_point()

Examples

1
gg_scatter(ggplot2::mpg, mapping = ggplot2::aes(x = displ, y = hwy), global = TRUE)

ygeunkim/goodgraphic documentation built on July 1, 2019, 1:37 a.m.