yihui / animation

A gallery of animations in statistics and utilities to create animations
https://yihui.org/animation/
206 stars 59 forks source link

Have trouble running Brownian Motion in a Circle example on Ubuntu 16.04 #101

Closed grandtiger closed 7 years ago

grandtiger commented 7 years ago

I just set up one of my laptops to use Ubuntu 16.04 and tried the following example. https://yihui.name/animation/example/bm-circle/

But I don't see any plots or animation in RStudio. It just kept asking me to hit to see next plot, but nothing shows up after I hit , fast or slowly.

Am I missing something obvious here? The same example works fine on Windows.

Anyone has similar experience and know of the solution please let me know. Thanks a lot!


> library(animation) 
> ani.options(interval = 0.1, nmax = 100) 
> par(mar = rep(0.5, 4)) 
> BM.circle(cex = 2, pch = 19) 
Hit <Return> to see next plot:  
Hit <Return> to see next plot:  
Hit <Return> to see next plot:  
Hit <Return> to see next plot:  
Hit <Return> to see next plot:  
Hit <Return> to see next plot:  
Hit <Return> to see next plot:  
Hit <Return> to see next plot:  
Hit <Return> to see next plot:  

Note sure the following info will be of any help.

> str(magick::magick_config())
List of 21
 $ version           :Class 'numeric_version'  hidden list of 1
  ..$ : int [1:4] 6 8 9 9
 $ modules           : logi TRUE
 $ cairo             : logi TRUE
 $ fontconfig        : logi TRUE
 $ freetype          : logi TRUE
 $ fftw              : logi TRUE
 $ ghostscript       : logi FALSE
 $ jpeg              : logi TRUE
 $ lcms              : logi TRUE
 $ libopenjp2        : logi FALSE
 $ lzma              : logi TRUE
 $ pangocairo        : logi TRUE
 $ pango             : logi TRUE
 $ png               : logi TRUE
 $ rsvg              : logi TRUE
 $ tiff              : logi TRUE
 $ webp              : logi FALSE
 $ wmf               : logi FALSE
 $ x11               : logi TRUE
 $ xml               : logi TRUE
 $ zero-configuration: logi FALSE
yulijia commented 7 years ago

Click your Plots window in Rstudio.

img

grandtiger commented 7 years ago

Thanks for your response! I did, but the plot window is empty. I think something is screwed up, but I don't know what that is. It's a brand new installation, and R and RStudio are always the first thing I set up.

BTW, even a simple plot is not showing up in the Plots window.

But when I run R directly from command line, the plots and animation show up on a separate window. So I can at least confirm that my R and animation dependencies are installed properly. It's something to do with RStudio.

yulijia commented 7 years ago

I will check it asap.

grandtiger commented 7 years ago

Never mind. I restarted RStudio, and now it works fine. I think it's because I started RStudio before some of the dependencies were installed.

I am closing this now. Thanks and have a great weekend!