我想显示一些 CDF 数据(R 代码如下),通过在 X 轴上使用一组数字 BREAKS 以彼此相等的距离显示(尽管在数字上,BREAKS 在 log10 轴上并且不反射相等的距离):
df <- data.frame(
x = c(rnorm(100, 0, 3), rnorm(100, 0, 10)),
g = gl(2, 100)
)
breaks=c(0.001, 0.01, 0.1, 1, 5, 10, 20, 30, 100)
ggplot(df, aes(x, colour = g)) +
stat_ecdf() +
scale_x_log10(breaks=breaks),
我该怎么做?