1

I am having some issues when plotting rasters with the raster::plot function. It seems that my Rstudio's graphic device has some problem and the plots are just very very tiny. As of illustration, if the outcome of

raster::plot(raster::raster(matrix(1:100,10,10)))

is

enter image description here

whereas if plotting it on R application or through my Mac's terminal, the output is just perfect. This happens to any raster I try to plot. In both applications, my raster and sp packages version are the same (2.6-7 and 1.2-5, respectively).

I am running RStudio version 1.0.136 on a 64bit iMac (late 2015). The R version running is 3.3.2. My os is version 10.12.6 (macOS Sierra). Any thoughts?

This question follows up raster::plot() plotting raster too small- is there an alternative on ggplot?, where I thought the issue was the raster file.

  • Upgrade to R 3.4.x and the latest RStudio and try again – Spacedman Dec 14 '17 at 12:33
  • It actually did not work. Moreover, it happens to happen only in RStudio. Running the same code from R or from the Terminal, the plot comes out perfectly. Any thoughts? – Bruno Conte Leite Apr 27 '18 at 11:52
  • Looks like Rstudio weirdness.... try community.rstudio.com – Spacedman Apr 27 '18 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.