I need some changes to this plot:
library(ggplot2) # load ggplot2 plotting package
x_var <- rnorm( n = 15, mean = 5, sd = 2)
y_var <- x_var + rnorm(n = 15, mean = 5, sd =4)
size_var <- runif(15, 1,10)
df.test_data <- data.frame(x_var, y_var, size_var)'
ggplot(data=df.test_data, aes(x=x_var, y=y_var)) +
geom_point(aes(size=(size_var)))
I'm asking:
- How can I change the title of the legend?
- How can I give to the points a color scale that changes with the value of the point (from yellow to red, yellow for values near to 2, red for values near to 7)
Is that what you want?