Knitr: Turning the R chunk figure caption 90 degrees inline Latex

大憨熊 提交于 2021-02-10 20:25:14

问题


Here is my a code to demo what I cannot do. I use an R chunk to make a figure and use out.extra='angle=90' to make the figure post sideways on the page. Now how do I get my caption to go sideways too?

\documentclass{article}
\usepackage{subcaption} 
\begin{document}

<<test-plot,echo=FALSE,fig.cap="I would like to be posted sideways under figure, NOT HERE",out.extra='angle=90'>>=
plot(1)        
abline(0, 1)    
plot(rnorm(10)) 
for(i in 1:10) {
    abline(v = i, lty = 2)
}
@
\end{document}

来源:https://stackoverflow.com/questions/31597285/knitr-turning-the-r-chunk-figure-caption-90-degrees-inline-latex

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!