-
Notifications
You must be signed in to change notification settings - Fork 285
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
rgl plots don't display in quarto #1800
Comments
Maybe a place to start is for you to see if there's a difference between leaflet and rgl's setup. |
Yes, there certainly is, because |
The biggest difference I've found so far is printing
and
In knitr, display of graphics happens in two steps. The second step is called |
I think the issue might lie in this code that patches quarto-cli/src/resources/rmd/patch.R Lines 146 to 171 in 33d62e1
The result of |
Hi @dmurdoch, just a note that we are doing this so that we can provide a more predictable markdown AST for downstream filters (e.g. enclosing things in the correct div structure). If you want to play with other variations of patching / dispatching to To install the dev version: https://github.com/quarto-dev/quarto-cli#development-version You may need to add $ quarto --version Which should be I'm also happy to hack on this with some guidance from you (i.e. more directed speculation as to what sort of change would get rgl working and preserve our override). I note that in the comments we have some code that works around limitations in R 3.4 -- I think we could probably drop this at this point if need be. Note also that changes in knitr could resolve this (and mitigrate the need to do any patching) but we generally don't want to depend on the very latest version of knitr. |
@jjallaire, thanks for the dev install instructions. I'll try that and see if I can figure out what's going on. |
When working on the R code its hard (impossible?) to hit a breakpoint b/c the R code is run from Quarto not from the current R session. I typically just use calls to |
I'm not seeing the scroll bar you mention. One thing we do with htmlwidgets in Quarto is that if they mark themselves as "knitr figures" (i.e. respecting fig.width and fig.height) then we attempt to make them responsive to the width of the body column by setting width=100% (which should at a minimum avoid horizontal scrollbars). Here is what I see on OS X w/ Chrome: Perhaps there is another example that will exhibit the scroll bars? If so LMK and I can suggest an approach to work around this. |
Re-opening pending resolution of the scrollbar issue. |
Okay, I did indeed observed the scrollbar in Firefox. We set |
Thanks, looks great now. |
rgl plots work in RMarkdown using several low level hooks that are set up by the
rgl::setupKnitr()
function. This doesn't work in quarto, presumably because things are implemented differently, though otherhtmlwidgets
-using packages (e.g.leaflet
) work fine.I'm not sure if this requires changes to
rgl
, toquarto
, or to both.I've also started an rgl issue.
Here's a sample RMarkdown document:
Here's the same thing as a Quarto document:
The text was updated successfully, but these errors were encountered: