-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plotly_r has deprecated orca
and now uses kaleido
#71
Comments
Let me tackle the first point, orca deprecation. Under the hood, pdf(NULL) # prevent the creation of an empty pdf
# Start of the user plot
library(plotly)
plot_ly(economics, x = ~pop)
# Capture the plot
library(plotly) # just in case
if (!require("processx")) install.packages("processx")
orca(last_plot(), file = "<filename>") I'm not familiar with the R programming language and the Regarding your second point, exporting to HTML. The script will be extended slightly differently, to this: # Start of the user plot
library(plotly)
plot_ly(economics, x = ~pop)
# Capture the plot
library(plotly) # just in case
library(htmlwidgets)
p <- last_plot()
htmlwidgets::saveWidget(as_widget(p), "<filename.html>") How should this script be modified so that the widget is not taking over the whole page? |
Plotly's documentation still refers to orca; where can I see this deprecation notice? |
Indeed, sorry. In the R-help it says "superseded by kaleido", but orca should still work. I'll try to get it running on my side, sorry. https://www.rdocumentation.org/packages/plotly/versions/4.10.4/topics/orca |
As for the Plotly-html output: what you are currently doing will produce a standalone HTML page. I have not been able to find what the Rmarkdown people are doing to include them into the markdown. I will research further, but I'm also not a specialist in such problem :-( all the best with this project! I really like this approach. |
A possible solution is to embed the resulting html-file into an iframe. Pandoc should be able to just include such a html-tag: <iframe src = ""></iframe> |
some more research turned up this suggestion: |
Awesome, thanks for taking the time to do the research. I don't have the time to work on this these days, but I am happy to review pull requests |
I was just experimenting for the first time with this phenomenal filter and noted the following problems:
orca
function for static image export and replaced it withkaleido
.Just for reference: this is the markdown I was experimenting with (macOS 14.5, R 4.4.0):
The text was updated successfully, but these errors were encountered: