0
我遇到的問題與How can I make my vertical labels fit within my plotting window?中的人相同,但在Jupyter中。當我在Jupyter內的R上製作一張barplot時,任何長的垂直x軸標籤都會被切斷。例如在Jupyter R中切斷X軸標籤
animals = c("dog","cat","squirrel","dog","fox","dog","llama","cat","tyrannosaurus rex")
sorted <- sort(table(animals), decreasing=T)
barplot(sorted, las = 2)
使用解決鏈接的問題
animals = c("dog","cat","squirrel","dog","fox","dog","llama","cat","tyrannosaurus rex")
sorted <- sort(table(animals), decreasing=T)
par(mar = c(15,4,4,2) + 0.1)
barplot(sorted, las = 2)
作品在R貴爲Mac而不是在Jupyter。
我也試圖與再版及其選項打,例如
library(repr)
options(repr.plot.width=4, repr.plot.height=4)
不過,雖然是可以收縮和伸展的情節,底部仍然得到切斷。
任何想法?