Movatterモバイル変換


[0]ホーム

URL:


# ggview

CRAN statusR-CMD-check

Choose the right picture size for a ggplot without leaving yourIDE.

  1. Set picture dimensions with thecanvas() element.

  1. Save the plot withsave_ggplot().
p<-ggplot(mtcars,aes(wt, mpg))+geom_point()+ggtitle("My Plot")+canvas(800,1000,units ="px")save_ggplot(p,"my_plot.png")

Installation

install.packages("ggview")# development versionremotes::install_github("idmn/ggview")

VS Code

The package relies on therstudioapi::viewer() functionto display plot previews. By default it does not work in VS Code, butinstalling theRextension fixes it. It tricks therstudioapi packageinto believing it is running in RStudio, and everything works.


[8]ページ先頭

©2009-2025 Movatter.jp