R:Scale_y_continuous不适用于boxplot

时间:2015-08-09 00:52:26

标签: r ggplot2

在R中使用ggplot2,我制作了以下图:

ggplot(data, aes(x=type, y=v, group = v)) + 
geom_boxplot(aes(fill = type)) + scale_y_discrete(breaks=1:100)

我收到以下错误消息:

Error: Discrete value supplied to continuous scale

这是为什么? (类型是分类变量,v是数值变量,FWIW。)

0 个答案:

没有答案