-
Notifications
You must be signed in to change notification settings - Fork 639
Open
Description
Hi folks, THANKS for a great library!
plotly.R v4.12.0 seems to have introduced a new regression: Using knitr (LaTeX), all rendered Plotly figures are now empty -- both inside the final compiled PDF, and inside each figure's individual PDF (in /figure/)
The workaround is reverting to v4.11.0
Min working example (test.Rnw):
\documentclass{article}
\begin{document}
<<include=FALSE>>=
library(knitr)
library(remotes)
#remotes::install_version("plotly", version = "4.11.0") # works
remotes::install_version("plotly", version = "4.12.0") # leaves empty figure
@
<<label=version, echo=FALSE, fig.keep='last', out.width="5in", crop=TRUE>>=
packageVersion("plotly")
@
Top line -- Figure should be below
<<label=Sepal, echo=FALSE, fig.keep='last', out.width="5in", crop=TRUE>>=
plotly::plot_ly(
data = iris,
x = ~Sepal.Length,
y = ~Sepal.Width,
type = 'scatter',
mode = 'markers',
color = ~Species,
marker = list(size = 10, opacity = 0.8)
)
@
Bottom line -- Figure should be above
\end{document}
To render, simple save the above snippet as a new file test.Rnw, and click the "Compile PDF" button in RStudio.
Note the absence of figures when using 4.12.0, both:
- in final-compiled PDF (here,
test.pdf) - in each figure's individual PDF (here,
/figure/Sepal-1.pdf)
Note that reverting to 4.11.0 allows figures to render properly:
Thanks for reading!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels