How to rotate one plot out of many when using knitr?

后端 未结 1 1889
难免孤独
难免孤独 2021-02-04 10:48

I am using knitr with plots. I would like to rotate one of them 90 degree. For example:

\\documentclass{article}

\\begin{document}


<

        
1条回答
  •  别那么骄傲
    2021-02-04 11:15

    I think you can use out.extra in the chunk options:

    From knitr docs: http://yihui.name/knitr/options

    out.extra: (NULL; character) extra options for figures, e.g. out.extra='angle=90' in LaTeX output will rotate the figure by 90 degrees; it can be an arbitrary string, e.g. you can write multiple figure options in this option; it also applies to HTML images (extra options will be written into the tag, e.g. out.extra='style="display:block;"')

    <>=
    # ... 
    @
    

    0 讨论(0)
提交回复
热议问题