【发布时间】:2016-05-14 00:49:48
【问题描述】:
我目前使用 stat_ecdf 来绘制我的累积频率图。
这是我使用的代码
cumu_plot <- ggplot(house_total_year, aes(download_speed, colour = ISP)) +
stat_ecdf(size=1)
但是我希望反转 ecdf(互补 ecdf)。有什么最简单的方法吗?
干杯!
【问题讨论】:
-
设置
stat_ecdf(size=1, mapping=aes(-download_speed))有效吗? -
它不能按我想要的方式工作:(。我想要的是 y 轴的值是 (1-y) 而不是 y,所以在查看绘图时我们可以得到'...% of the sample has .... or more'而不是'....% of the sample has .... or less'