sebastianbarfort / mapDK

R package for making maps of Denmark
49 stars 5 forks source link

Potentialt error when show_missing=FALSE #23

Open ghost opened 7 years ago

ghost commented 7 years ago

I don't know whether this is exclusively and error on my part of if you're already aware, but when you set show_missing=FALSE the map misplaces the colours. EG: In the crime example from the package you can plot:

mapDK(values = "indbrud", id = "kommune", data = crime)

This will place a lightblue colour on Copenhagen with the crime value on approx 4000.

If you change the show_missing option to:

mapDK(values = "indbrud", id = "kommune", data = crime, show_missing=FALSE)

This will now switch up the colours on the plot so that the high value from Copenhagen now is plotted in Aabenraa. I take it this is not intended.

/Kristian

krzysztofarendt commented 6 years ago

I can confirm this behavior. Seems like a bug.