scatterplot_w_colour: Plot a scatter plot using a coloured palette

Description Usage Arguments Value Examples

View source: R/sbpiper_plots.r

Description

Plot a scatter plot using a coloured palette

Usage

1
2
3
scatterplot_w_colour(df, g = ggplot(), colNameX = "x", colNameY = "y",
  colNameColor = "colour", dot_size = 1,
  colours = colorRamps::matlab.like(256), limits = NULL)

Arguments

df

a data frame

g

the current ggplot to overlap

colNameX

the name of the column for the X axis

colNameY

the name of the column for the Y axis

colNameColor

the name of the column whose values are used as 3rd dimension

dot_size

the size of the dots in the scatterplot

colours

the palette to use

limits

the limits for the palette (NULL if no limit is used)

Value

the plot

Examples

1
2
df <- data.frame(a=rnorm(10000), b=rnorm(10000), c=rev(seq(10000)))
scatterplot_w_colour(df, colNameX="a", colNameY="b", colNameColor="c")

sbpiper documentation built on May 2, 2019, 8:53 a.m.