tmap icon indicating copy to clipboard operation
tmap copied to clipboard

Error in valid.viewport(x, y, width, height, just, gp, clip, mask, xscale

Open anjelinejeline opened this issue 5 months ago • 7 comments

Hello, I am trying to plot the ADM2 shapefile that can be found here https://www.geoboundaries.org/globalDownloads.html However I am facing this error

Error in valid.viewport(x, y, width, height, just, gp, clip, mask, xscale,  : 
  invalid 'xscale' in viewport
In addition: Warning message:
The shape World is invalid. See sf::st_is_valid

I tried fixing it with tmap_options(check.and.fix = TRUE) and sf_use_s2(FALSE) but none of them worked. I read that others faced similar issues https://github.com/r-tmap/tmap/issues/606 But I cannot understand what the problem is in my case given that I can plot it with the plot function of sf.

anjelinejeline avatar Sep 09 '24 14:09 anjelinejeline