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?
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.
imposing limits effects the way colours are applied, you may have found a way to set the limits just so that the full range of colours is not expressed. I don't feel able to comment on that without access to your data or something analogous
Here is an attempt at that with the built-in iris dataset used as example data. I set the limits to the range covering the min and the media, and you can see how half the dots are coloured and half are not. You didn't say what it was you hoped to achieve by setting limits, perhaps there is a different way to do what you intend that doesnt effect the colouring, only you are setting limits on the colouring function, so it appears that you do want to influence the colours ... Can you clarify this point ?