Why are plotly-rendered graphs not working on Mozilla
Asked Answered
O

2

2

I am getting the following error when trying to open an html document put together with knitr in Mozilla Firefox. The error is a result of the graph element composed with the plotly package.

unknownError: error occurred while processing 
'getCachedMessages: out of memory

The entire contents of the rmarkdown file (default everything else):

library(plotly)
library(ggplot2)
theData <- data.frame(A=1:26, B=letters, C=rnorm(26,19))

g<-ggplot(theData, aes(x=A, y=C)) +
  geom_point()
ggplotly(g)

I have the most recent version of Firefox. I don't seem to have trouble viewing other pages with plotly elements on them. The page works in IE, no problem.

Outdoors answered 11/1, 2017 at 22:14 Comment(2)
Works fine with Firefox 50.1.0 / win 7Autotoxin
I have 50.1.0/win 10 but I am have problems viewing ploty rendered graphs in RMarkdownAleris
D
7

(apologies - I do not have enough points to respond in comments)

I get same problem with R + Rmd + plotly + Firefox (but no issue with IE or Opera). The following issues have been raised at Github / ropensci / plotly - but no solutions as of 2017-01-20 :

  1. plotly + FlexDashboard + Firefox = huge memory consumption #721
  2. Very bad performance of RMarkdown in Firefox #483
  3. R library: Big slowdown in Firefox but not in Chrome #17 (github / plotly / plotly.js / issues / 17)
Delenadeleon answered 20/1, 2017 at 10:26 Comment(1)
I'm experiencing the same problem too.Camelback
M
0

So far (2018-05-08) it seems that this issue persists. But there is a workaround which cpsievert mentions on GitHub (see camelCase's answer for the links).

You have to add self_contained: false to the YAML header like this:

---
title: "Your title"
output:
  html_document:
    self_contained: false
---

The problem with this hack is that you will no longer have a standalone .html file. Please, see the topic Document Dependencies at https://rmarkdown.rstudio.com/html_document_format.html for more details.

Mutiny answered 9/5, 2018 at 1:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.