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

Can't plot rasters #264

Closed
kadyb opened this issue Sep 6, 2023 · 1 comment
Closed

Can't plot rasters #264

kadyb opened this issue Sep 6, 2023 · 1 comment

Comments

@kadyb
Copy link

kadyb commented Sep 6, 2023

I wanted to test the terra (and raster too) package in action on https://webr.r-wasm.org/latest/, but it seems that the raster plotting doesn't work properly. Basically, cells with values are not displayed.

library("raster")
library("terra")

## terra
f <- system.file("ex/elev.tif", package = "terra")
r <- rast(f)
plot(r)

## raster
plot(raster(r))
@georgestagg
Copy link
Member

georgestagg commented Sep 6, 2023

Thanks for reporting, this is due to #251. For the moment using png() should work, producing an image file in /home/web_user that can be downloaded.

I'm going to close this issue in favour of the other one, but please feel free to make a comment in that thread with your example code -- it is a useful test.

Duplicate of #251.

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

2 participants