fig.align没有使用R Markdown
HTML输出和剧情,我寻求一些帮助!
这是一个MWE:
---
title: "Untitled"
output: html_document
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, fig.align = "center")
library(plotly)
```
```{r}
plot_ly(
x = c("giraffes", "orangutans"),
y = c(20, 14),
name = "SF Zoo",
type = "bar")
```
```{r, fig.align = 'right'}
plot_ly(
x = c("giraffes", "orangutans"),
y = c(20, 14),
name = "SF Zoo",
type = "bar")
```
```{r, fig.align = 'center'}
plot_ly(
x = c("giraffes", "orangutans"),
y = c(20, 14),
name = "SF Zoo",
type = "bar")
```