r图在Mac上没有显示,但在Windows上显示了相同的绘图
昨天我买了一个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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也有一个类似的问题 - 无论我使用的R版本或使用的库,我的R在绘制时都停止响应。我通过在安全模式下重新启动我的M1 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