r - Cannot add caption to landscape format figure in knitr -
\documentclass{article} \usepackage{pdflscape} \begin{document} \begin{landscape} graph (fig. \ref{fig:mygraph1}in landscape format works fine. <<mygraph1,out.width='1\\linewidth', fig.width=11.5, fig.height=6, echo=false >>= graph <- c(1, 7, 9, 11, 9) plot(graph) @ when adding caption figure breaks <<mygraph2,out.width='1\\linewidth', fig.width=11.5, fig.height=6, echo=false, fig.cap="caption">>= graph <- c(1, 7, 9, 11, 9) plot(graph) @ , breaks if made latex figure \begin{figure} <<mygraph3,out.width='1\\linewidth', fig.width=11.5, fig.height=6, echo=false >>= graph <- c(1, 7, 9, 11, 9) plot(graph) @ \end{figure} \end{landscape} \end{document}
this seemingly answered here: knitr rnw latex: how obtain figure , caption in landscape mode that's full page width
however putting chunk within \begin{figure} doesn't seem solution. @ least me figure still breaks landscape orientation. ideas?
Comments
Post a Comment