Skip to content
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

fig.cap="caption" does not work for plotly plots. #1223

Closed
mdphan opened this issue Jun 8, 2016 · 4 comments
Closed

fig.cap="caption" does not work for plotly plots. #1223

mdphan opened this issue Jun 8, 2016 · 4 comments
Labels
feature Feature requests
Milestone

Comments

@mdphan
Copy link

mdphan commented Jun 8, 2016

Knitr does not print out captions for plotly plots. See example below.

```{r cars, fig.cap="About cars"}
library(plotly)
plot_ly(data=cars, x=speed,y=dist, type="scatter", mode="markers")
@yihui
Copy link
Owner

yihui commented Jun 14, 2016

fig.cap only works for HTML widgets when the output format is not HTML.

@tingleyd
Copy link

tingleyd commented Oct 4, 2016

Is there an alternative way to put a caption when using plotly and html output?

@yihui
Copy link
Owner

yihui commented Oct 4, 2016

Yes, just install the development version via

devtools::install_github('yihui/knitr')

A minimal example:

```{r cars, fig.cap="About cars"}
library(plotly)
plot_ly(data=cars, x=~speed,y=~dist, type="scatter", mode="markers")
```

@github-actions
Copy link

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Feature requests
Projects
None yet
Development

No branches or pull requests

3 participants