File: my-plot.r

package info (click to toggle)
r-cran-ggplot2 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,412 kB
  • sloc: sh: 9; makefile: 1
file content (12 lines) | stat: -rw-r--r-- 240 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#' Create a plot.
#'
#' @export
#' @import ggplot2
#' @examples
#' plot(my_plot())
my_plot <- function() {
  df <- data.frame(x = 1:10, y = sample(10), z = runif(1))

  ggplot(df) + geom_point(aes_string(x = "x", y = "y", colour = "z"))

}