Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 ggplot 图中格式化连续轴上的数字。我想有一个大数字的法语格式,每三位有一个空格(即“20 000”而不是“20000”)。我知道可以使用该format()函数(例如format(20000, scientific=FALSE, big.mark = " "))来做到这一点,但我不知道如何将此函数与 ggplot 结合使用。我可以想象其中有一个选项,scale_y_continuous()但我自己无法找到解决方案。这是我的要点文件。
format()
format(20000, scientific=FALSE, big.mark = " ")
scale_y_continuous()
french = function(x) format(x, big.mark = " ") p + scale_y_continuous(labels=french)