找不到这在谷歌搜索,所以我想我会在这里记录它。R ggplot2轴的变化单位
我的问题是我需要改变我的y轴标签个基点,而不是标准的单位,但我无法找到一个方法来解决这个简单的问题,我有我的情节是这样的:
p <- ggplot(plotdat, aes(x = name, y = value, fill = variable)) +
geom_bar(position = "dodge")
但我一直试图使用这一行,但我不断收到错误。
p + scale_y_continuous(labels = function(x) as.character(x*10000), breaks = 10)
Error in as.vector(x, "character") :
cannot coerce type 'closure' to vector of type 'character'
如何更改我的y轴刻度标签的格式?
[ggplot2 axis transformation by constant factor]可能出现重复(http://stackoverflow.com/questions/4646020/ggplot2-axis-transformation-by-constant-factor) – daroczig 2012-08-16 10:24:49