I am trying to do a plot with ggplot(). When I am doing the code I add the limits to my chunk, and the color of my plot disappears, and it becomes a scatter plot in black and white. Can someone help me, please?
The code chunk is:
ggplot(data = one.data) + geom_point(aes(plot_X, plot_Y, colour = value, size = log_size), alpha = I(0.7)) + scale_color_gradientn(colors = c("blue", "green", "yellow", "red"),limits = c( min(one.data$value), 0))`
Without limits function the color works. However, with the limit() function it doesn't work and becomes black and white. And I need these limits to create my plot.