Why "red" is showing "orange"?

I ran this code inside the ggplot to fill my map:

scale_fill_stepsn(colors = c("red","yellow","green3"),
limits = c(0.2,0.6),
guide = guide_coloursteps(even.steps = FALSE,
show.limits = TRUE),
breaks= c(0.2,0.33,0.46,0.6))+

Although I specified colors, red is being orange for some reason.

I have tried other shades of red, but it is not working at all. When I change the color of the title to red it changes, but with scale_fill_stepsn() it is not giving me red. I rethinking my life now, at some point I thought I am colorblind, but I am not my friends confirmed that it is not red.

What can I do to fix this?
Thank you,

Indeed, this is a bit weird, also the green3 seems to be lighter.
I am not so proficient with scale_fill_n, but some thoughts:

  1. Is it may be possible, your data contain more extreme values, outside of the limits, so you actually skip the extremes that would have the darkest colours.
  2. Actually you bin the data, so red is everything from 0.2 to 0.33, so also the colour represents not the extreme value at 0.2 (which would be red) but 0.265 (the mean of both), so eventually choosing darker colours (e.g. darkred) and darkgreen results in colours closer to what you want.

That being said:
-Can you share the data used? Or some similar fake-data? And the full code?
-Can you try it with less parameters (not setting the limits and breaks)?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.