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
plot(SpatialPolygonsDataFrame) is insanely slow for RStudioGD #3866
Comments
Could kindly provide information about the RStudio version, the OS and the R version? I tried your code and |
@pascaloettli added |
@MichaelChirico Thank you. I tried also in RStudio |
I am able to reproduce the problem with RStudio Desktop 1.2.1184-1 on MacOS 10.14.2 Mojave, nd when done, nothing is displayed. It works fine with RStudio Server 1.2.1186-1 on Ubuntu 16.04.5. On RStudio Desktop 1.1.463, the process never completed—it continued for at least 10 minute. @MichaelChirico Can you clarify: on Ubuntu 18, were you using the desktop or server product? And for MacOS, did you mean desktop, or are you referring to using a Mac to connect to a remote server? |
Strangely, I still cannot reproduce with RStudio Desktop |
@ronblum I think only @pascaloettli was trying this on Ubuntu. For me, I only ran this on my local machine (see |
Same here... MAC OS mojave |
This is still an issue in RStudio Desktop 1.3.799 on MacOS 10.15.3 (Catalina). We'll review the issue as we continue development of RStudio, but we unfortunately don't have a timeframe for a solution. |
Hi, did anyone ever find an answer to this? I just got a new macbook pro (13 inch, 2020) and am having the same problem. RstudioGD:
pdf:
I am on rstudio version 1.3.1093 and mac big sur 11.1 |
I have exactly the same problem, but only on a Macbook Air 2019. I was hoping that an upgrade from Catalina to Mac Big Sur 11.1 would help. But it didn't. If you found the solution for this @jakelawlor I'd appreciate you sharing it. Thanks |
The same extremely slow plotting for me on my Mac Pro. Solution for others. plot_2png <- function(x, filename) {
x <- substitute(x)
stopifnot(is.call(x))
filename_path <- file.path(getwd(), filename)
file.create(filename_path)
png(filename_path)
eval(x)
dev.off()
} usage for one or many plots. plot_2png({
plot(pl)
plot(voi, add = TRUE)
}, "PATH/FILE.png") Still not enough if sb want to use it in e.g. EDIT I have a new observation that the same slow computation occurs from R base GUI. |
I'm having the same issue. Occasionally it will run as normal but most of the time Rstudio crashes and can't produce the plot. It definitely appears to be a graphics issue for me but I haven't worked out the differences yet between when it runs as normal or when it crashes Rstudio. However, I've found that if I run X11(type = "cairo") before the query then the performance time is normal in the graphics box. |
I had the same problem in a mac os. My solution was to install XQuartz (https://www.xquartz.org/), then use x11() to plot the spatial object, however you will need to set "usePolypath = FALSE". Example:
|
Don't use the "(default)" With (default):
With Cairo:
With AGG:
|
I wanted to plot the shapefile for Myanmar found here:
https://gadm.org/download_country_v3.html
Plotting this with
RStudioGD
is much, much slower than to e.g.pdf
:Restart R to clear cache/overhead and run again:
So using the external device is about 300x faster... any idea?
png
also takes < 1 secondThe text was updated successfully, but these errors were encountered: