Examveda

In ggplot2, how do you add a color gradient to a scatter plot based on a numeric variable color_var?

A. scale_fill_gradient(low = "blue", high = "red")

B. color_gradient(low = "blue", high = "red")

C. scale_color_gradient(low = "blue", high = "red")

D. geom_point(aes(color = color_var), fill = "blue")

Answer: Option C


This Question Belongs to R Programming >> Data Visualization With Ggplot2

Join The Discussion

Related Questions on Data Visualization with ggplot2