f_plot_pretty_points: plot prettier dot plot

Description Usage Arguments Details Value See Also Examples

View source: R/f_plot.R

Description

color is contineoulsy scaled based on PC1 values and alpha values depend on point density.

Usage

1
2
f_plot_pretty_points(df, col_x, col_y, col_facet = NULL, size = 4,
  title = NULL, x_title = col_x, y_title = col_y, ...)

Arguments

df

datafram containing x,y pairs

col_x

character vector denoting x axis values

col_y

character vector denoting y axis values

col_facet

character vector denoting facetting column

size

size of points, Default: 4

title

character vector, Default: NULL

x_title

character vector, Default: col_x

y_title

character vector, Default: col_y

...

arguments passed to facet_wrap()

Details

Code adapted from https://drsimonj.svbtle.com/pretty-scatter-plots-with-ggplot2

Value

plot

See Also

interp.surface kde2d

Examples

1
2
3
4
5
6
7
df = ggplot2::diamonds %>%
  sample_n(2500)
col_x = 'carat'
col_y = 'price'
col_facet = 'cut'

f_plot_pretty_points(df, col_x, col_y, col_facet, title = 'price of diamonds by carat')

erblast/oetteR documentation built on Nov. 13, 2018, 9:09 a.m.