Skip to content

Instantly share code, notes, and snippets.

@jthomasmock
Created November 16, 2022 21:57
Show Gist options
  • Select an option

  • Save jthomasmock/293a5a51ea4f536b6548a8abb1a8f04b to your computer and use it in GitHub Desktop.

Select an option

Save jthomasmock/293a5a51ea4f536b6548a8abb1a8f04b to your computer and use it in GitHub Desktop.

Revisions

  1. jthomasmock created this gist Nov 16, 2022.
    34 changes: 34 additions & 0 deletions example.qmd
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    ---
    format: html
    ---

    ```{r}
    library(ggplot2)
    library(grid)
    ```

    ```{r}
    #| warning: false
    grid::grid.newpage()
    p <- ggplot(mtcars, aes(x = disp,y = mpg)) + geom_point()
    print(p, vp=grid::viewport(angle=-90))
    ```

    ```{r}
    #| echo: fenced
    #| out-extra: "style='transform: rotate(90deg); margin-top: 75px;'"
    p
    ```

    ```{r}
    #| echo: fenced
    #| out-extra: 'angle=90'
    p
    ```


    ```{r}
    ggsave("norm-plot.png", p)
    ```