测试代码
library(ggplot2)
ggplot(women, aes(height, weight)) + geom_point()
系统环境
xfun::session_info()
#> R version 4.1.0 (2021-05-18)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 20.04.2 LTS
#>
#> Locale:
#> LC_CTYPE=zh_CN.UTF-8 LC_NUMERIC=C
#> LC_TIME=zh_CN.UTF-8 LC_COLLATE=zh_CN.UTF-8
#> LC_MONETARY=zh_CN.UTF-8 LC_MESSAGES=zh_CN.UTF-8
#> LC_PAPER=zh_CN.UTF-8 LC_NAME=C
#> LC_ADDRESS=C LC_TELEPHONE=C
#> LC_MEASUREMENT=zh_CN.UTF-8 LC_IDENTIFICATION=C
#>
#> Package version:
#> backports_1.2.1 base64enc_0.1.3 callr_3.7.0 cli_2.5.0
#> clipr_0.7.1 compiler_4.1.0 crayon_1.4.1 digest_0.6.27
#> ellipsis_0.3.2 evaluate_0.14 fansi_0.4.2 fs_1.5.0
#> glue_1.4.2 graphics_4.1.0 grDevices_4.1.0 highr_0.9
#> htmltools_0.5.1.1 jsonlite_1.7.2 knitr_1.33 lifecycle_1.0.0
#> magrittr_2.0.1 markdown_1.1 methods_4.1.0 mime_0.10
#> pillar_1.6.1 pkgconfig_2.0.3 processx_3.5.2 ps_1.6.0
#> purrr_0.3.4 R.cache_0.15.0 R.methodsS3_1.8.1 R.oo_1.24.0
#> R.utils_2.10.1 R6_2.5.0 rematch2_2.1.2 reprex_2.0.0
#> rlang_0.4.11 rmarkdown_2.8 rprojroot_2.0.2 rstudioapi_0.13
#> stats_4.1.0 stringi_1.6.2 stringr_1.4.0 styler_1.4.1
#> tibble_3.1.2 tinytex_0.31 tools_4.1.0 utf8_1.2.1
#> utils_4.1.0 vctrs_0.3.8 withr_2.4.2 xfun_0.23
#> yaml_2.2.1
<sup>Created on 2021-05-22 by the reprex package (v2.0.0)</sup>
注:上述测试代码在R Gui下能正常运行。