0

I am doing a map of the united states , but I wanted to change the color of the states fill , however when I try to do it it only changes the colors of the lines between the states and not the state :(

Can anyone tell me how to change the color feature and also how can I add color intervals to the map.

Here is my code : enter image description here

And the map that it gives me : enter image description here

I tried to change the colors of all the map filling but it only changes the color of the line between the states.

kjetil b halvorsen
  • 1,206
  • 2
  • 18
  • 28
sikimimi
  • 1
  • 2
  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. Please [do not post code or data in images](https://meta.stackoverflow.com/q/285551/2372064) `fill=` change the color inside the state and `color=` change the color of the lines separating states. – MrFlick Dec 07 '22 at 16:31

1 Answers1

0

@sikimimi. You can change your color palette by adding a scales control, scale_fill..., to your code.

For example, in scale_fill_gradient() you can set a low and high color value.

The ggplot reference has a complete list of these controls.

Seth
  • 1,659
  • 1
  • 4
  • 11
  • Thank you. Do you know where can I find the color references ? Because in the argument example they have wirtten a reference for the light and the dark blue :) – sikimimi Dec 07 '22 at 16:05