Something similar is possible in Windows, but the PDF viewer you're using simply hasn't implemented that. This gives the PDF viewer a chance to re-read the file and re-process the contents. When you wrote to the file, your PDF viewer received a signal that the file it was watching changed. Next, it sets up an inotify, meaning that if someone writes to the file, your PDF viewer will be notified. It does not have to close the file, but it might. I suspect, the PDF viewer opens the file, and then reads/processes the contents. This is a function of the PDF viewer you are using. So probably, it is more dependent on the property of PDF viewer also. Evince works same in both Ubuntu and Windows. I was able to successfully modify the open PDF in Windows. In order to remove some variables, I tried to download the Evince PDF viewer for windows (Evince 2.32) and then opened the PDF using Evince in Windows and did the same experiment again. Why there is a difference in behavior in Linux (I am working with Ubuntu 20.04)?Īdding the output of the Windows error Error in pdf(file = "Forest_levels_2.pdf", width = 12, height = 12) : Then, if I run the code again, the file gets output and overwrites the previous PDF, and the output in PDF viewer is also instantly changed.īut if I try to do the same in Windows, that is I have kept the PDF open with a PDF viewer, and I try to run the code, the following error will come -> cannot access pdf. The thing I am intrigued about is: suppose I have kept the pdf (which I output from the previous step, namely Forest_levels_2.pdf) open in a PDF viewer. ) + ylab("Odds Ratio")+labs(col="Interventions") = element_rect(), = element_blank(), = element_text(size = 14) Xlab('Outcomes Evaluated')+ geom_errorbar(aes(ymin=lower, ymax=upper,col=levels),width=0.2,cex=1)+įacet_wrap(~outcome,strip.position="top",nrow=1,scales = "free_x") + theme(Īxis.line = element_line(colour = "black"), Geom_hline(aes(fill=levels),yintercept =1, linetype=2)+ library(ggplot2)Īes(x = levels,y=center, ymin=lower, ymax=upper))+ the code for creating a graph is as follows. When I am working with graphs in R, I try to output them directly into PDF.
0 Comments
Leave a Reply. |