powered by
Plot a scatter plot using a coloured palette
scatterplot_w_colour(df, g = ggplot(), colNameX = "x", colNameY = "y", colNameColor = "colour", dot_size = 1, colours = colorRamps::matlab.like(256), limits = NULL)
a data frame
the current ggplot to overlap
the name of the column for the X axis
the name of the column for the Y axis
the name of the column whose values are used as 3rd dimension
the size of the dots in the scatterplot
the palette to use
the limits for the palette (NULL if no limit is used)
the plot
# NOT RUN { df <- data.frame(a=rnorm(10000), b=rnorm(10000), c=rev(seq(10000))) scatterplot_w_colour(df, colNameX="a", colNameY="b", colNameColor="c") # }
Run the code above in your browser using DataLab