Categories
Mastering Development

Can ggplot only plot x and y as isolated vectors?

I know this is too simple of a question but can ggplot (or any plotting function in ggplot2) only plot x and y as isolated vectors (not from a data.frame)? x <- rnorm(30) y <- rnorm(30) d <- data.frame(x, y) ggplot(d)+ geom_point(aes(x,y)) # I know this works but this requires `x` & `y` to be […]

Categories
Mastering Development

Too simple of a question: can ggplot only plot x and y as isolated vectors?

I know this is too simple of a question but can ggplot (or any plotting function in ggplot2) only plot x and y as isolated vectors (not from a data.frame)? x <- rnorm(30) y <- rnorm(30) d <- data.frame(x, y) ggplot(d)+ geom_point(aes(x,y)) # I know this works but this requires `x` & `y` to be […]