Charles Knell
Charles Knell

Reputation: 145

How can I use values for the plot point symbols for a scatter plot in R

I've used ggplot2 in the past, but I'm stumped on this one. I'd like to create a scatter plot and use the values in a column as point symbols rather than the standard ggplot symbols. Has anyone done this before?

Thanks.

Upvotes: 0

Views: 204

Answers (1)

Balter
Balter

Reputation: 1095

Like this?

a <- data.frame(X = runif(n = 10),
                Y = runif(n = 10), 
                VAL = 1:10)

library(ggplot2)


ggplot(a, aes(x = X, y = Y))+geom_text(aes(label = VAL))

Upvotes: 3

Related Questions