---
title: "How do you top align this figure below?"
output: flexdashboard::flex_dashboard
---
```{r c1, fig.width=9}
plot(mtcars)
```
当我最大化我的仪表板窗口时,上面的R flexdashboard代码生成一个垂直居中的图。看起来像这样。
相反,我希望图像在垂直方向上对齐,图像上方没有空白。看起来像下面的图像,在图像下方放置了任何空白(应该最大化窗口)。如果您的输出与我的不完全匹配,只需将输出窗口调整为又高又薄(请考虑旋转“编码”监视器)。
将R降价的说法fig.align
只具有水平选项(left
,right
,center
)和flexdashboard说法.no-padding
似乎并没有帮助呢。
如何使flexdashboard在R Markdown中顶部对齐?
您可以css
用来覆盖background
图像的位置。
---
title: "Flex"
author: ""
output:
flexdashboard::flex_dashboard:
orientation: rows
css: styles.css
---
Page One
=======================================================================
Row
-----------------------------------------------------------------------
### chart1
```{r, fig.width=12}
plot(mtcars)
```
styles.css(在同一工作目录中):
.image-container {
background-position: center top !important;
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句