1

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}
Yihui Xie
  • 28,913
  • 23
  • 193
  • 419
Lacko
  • 11
  • 1
  • I don't think `knitr` can do this for you. But you can still use `knitr` to generate the plot and then include it manually into your document. How to do this depends on whether there is other content than a figure on the page or not. Have a look at [this answer](http://tex.stackexchange.com/a/46337/37118) to get some inspiration. – CL. Jul 24 '15 at 18:14
  • or this http://tex.stackexchange.com/questions/101645/how-to-turn-latex-figure-by-90-degrees-along-with-the-caption – baptiste Jul 24 '15 at 23:17

0 Answers0