-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mismatched colors in legend for raster (similar to issue 362 but unresolved for raster?) #439
Comments
What happens if you add |
Ok, I think the problem is that you actually want a factorial raster rather than a numeric one. Can you provide the data for me to look into it deeper? |
Sure. You should be able to download then load the raster as an R obj (to avoid conversion to tif) from here |
Thanks. I am travelling today so will probably not be able to look at it until tomorrow |
Have a safe trip! Thanks! |
Hello and thanks for this great package, so useful to explore maps while developing a piece of code
I encounter a problem, which I believe is similar to 362, which was resolved, but maybe not for raster layers?
I have a raster layer with 3 values: 2001,2008,2019
If I run mapview with 3 colours: red for 2001, blue for 2008 and green for 2019, I get a legend with interpolated colour (purple) for the 2001 value. The other two colours being correct on the map.
The warning indeed informs me I have 4 values but there is actually only 3 (all zeroes were previously sent to NA and are thus transparent)
I can obtain the map I want if I add a fourth colour, i.e. yellow in this example, but then the legend no longer corresponds. The last one (green) is not in
Looks like mapview believes there is another, smaller ,value in the raster, but there are none, which the legend seems to get correct in terms of values, not colours
(sorry if this not std process for reporting, this is actually 1st time ever I report an issue with github)
Thanks for great work and any help
Geoffrey
The text was updated successfully, but these errors were encountered: