Skip to content
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

find a good way of storing colours for categorical afrilandcover raster #8

Open
andysouth opened this issue Nov 9, 2021 · 0 comments

Comments

@andysouth
Copy link
Member

I would like the labels and colours for the categorical raster object afrilandcover to be stored in the object so that it is easy for new users to be able to plot them.

The current sub-optimal solution enables this to work in mapview but similar seems not to work in tmap

mapview(afrilandcover, att="landcover", col.regions=levels(afrilandcover)[[1]]$colour)

Here is my unfinished experimentation including trying stars & terra. Ideally I'd like to use stars.

afrilandcover <- ratify(afrilandcover)

If anyone has a good solution for this I'd be very grateful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant