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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -