r图在Mac上没有显示,但在Windows上显示了相同的绘图

发布于 2025-01-29 05:47:11 字数 548 浏览 4 评论 0原文

昨天我买了一个Mac(M1处理器),今天我安装了R和R Studio。我试图在Windows机器和Mac中绘制相同的代码,但图仅在Windows上显示。在Mac上,“绘图”窗口仅显示一个白色盒子,如果我尝试导出它,则会出现相同的白色盒子。

代码是:

library(ggshakeR)
 
 library(worldfootballR)
 
 single_player <- fb_player_scouting_report("https://fbref.com/en/players/f586779e/Tammy-Abraham", pos_versus = "primary")
 
 pizza <- plot_pizza(data = single_player, type = "single", template = "forward",    colour_poss = "#41ab5d", colour_att = "#fec44f", season = "Last 365 Days", colour_def = "#de2d26", theme = "dark")
 pizza

Yesterday I bought a Mac (M1 processor) and today I installed R and R Studio. I tried to plot the same code in a Windows machine and my Mac, but the plot only shows on Windows. On Mac the "plots" window only shows a white box and if I try to export it, the same white box appear.

The code is:

library(ggshakeR)
 
 library(worldfootballR)
 
 single_player <- fb_player_scouting_report("https://fbref.com/en/players/f586779e/Tammy-Abraham", pos_versus = "primary")
 
 pizza <- plot_pizza(data = single_player, type = "single", template = "forward",    colour_poss = "#41ab5d", colour_att = "#fec44f", season = "Last 365 Days", colour_def = "#de2d26", theme = "dark")
 pizza

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

撩动你心 2025-02-05 05:47:11

我也有一个类似的问题 - 无论我使用的R版本或使用的库,我的R在绘制时都停止响应。我通过在安全模式下重新启动我的M1 MAC来解决它,并在安全模式下绘图工作。幸运的是,当我在正常模式下重新启动时,它一直在工作。

这是苹果支持有关如何在安全模式下重新启动的说明

他们说

安全模式可以帮助您确定问题是否是由
Mac启动时加载的软件。

I had a similar issue - my R used to stop responding when I plotted, irrespective of the R version or the library I used. I solved it by rebooting my M1 Mac in safe mode, and plotting worked while in safe mode. And luckily it kept working afterwards when I restarted in normal mode.

This is apple support instruction on how to reboot in safe mode.

They say

Safe mode can help you determine whether an issue is being caused by
software that loads when your Mac starts up.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文