gpt4 book ai didi

r - 使 R Studio 绘图仅显示在新窗口中

转载 作者:行者123 更新时间:2023-12-02 11:24:31 25 4
gpt4 key购买 nike

使用 R Studio 时,我通常只使用堆叠在控制台顶部的 .R 文件。我将其他 Pane (环境、历史、文件等)隐藏起来。

但是每当我绘制图形时,其他 Pane 都会自动从侧边栏弹出以显示绘图 Pane 。因为我在笔记本电脑上工作,所以所有东西都太小而无法看到。通过单击绘图 Pane 上的缩放按钮,我可以让绘图也显示在新窗口中,但不会阻止绘图 Pane 显示。

有没有办法在 R Studio 中“禁用”绘图 Pane ,并在新窗口中显示强制绘图?

> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils
[5] datasets methods base

other attached packages:
[1] ggplot2_2.2.1 jsonlite_1.4
[3] data.table_1.10.4

loaded via a namespace (and not attached):
[1] labeling_0.3 colorspace_1.2-6
[3] scales_0.4.1 lazyeval_0.2.0
[5] plyr_1.8.4 tools_3.2.3
[7] gtable_0.1.2 tibble_1.3.0
[9] curl_2.5 Rcpp_0.12.10
[11] grid_3.2.3 munsell_0.4.2
>

最佳答案

在 RStudio 中,默认的图形设备通常是 "RStudioGD" .您可以将其更改为其他内容:正常选择是 "windows"在 Windows 上,"quartz"在 MacOS 上,"X11"在 Linux 上。例如,使用

options(device = "quartz")

在 Mac 上的 RStudio session 中,您将获得常规的 MacOS 图形窗口。

关于r - 使 R Studio 绘图仅显示在新窗口中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46534643/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com