R not producing a figure in jupyter (IPython notebook) R not producing a figure in jupyter (IPython notebook) r r

R not producing a figure in jupyter (IPython notebook)


I found a solution from the post on this group.

Solution I did:

I had the most release of R (R 3.2.0) and following the discussion in the above link, I installed R 3.1.3 and copied winCairo.dll from C:\Program Files\R\R-3.1.3\library\grDevices\libs\x64 to C:\Anaconda\R\library\grDevices\libs\x64.

Copying winCairo.dll from R 3.2.0 does not work for my case.

With this, it plots a figure but with an error message that says "Error in replayPlot(obj): invalid graphics state"

Then, thanks to this link,I added 'options(jupyter.plot_mimetypes = 'image/png')' and it works fine.

enter image description here

options(jupyter.plot_mimetypes = 'image/png')

x=1:10

plot(x)

enter image description here