r - 在geom_rect中放置一定数量的点
问题描述
我有以下数据:
set.seed(1)
df <- data.frame(ID = c(1:123),
value = rnorm(123, mean = 30))
我准备情节
ggplot (df) +
geom_rect(aes(xmin = 0, xmax = 100, ymin = 28.4, ymax =31.6),
fill = "lightcoral", alpha = 0.006) +
geom_point(aes(x=ID, y = value), color = "red3")
如何确定(计算)y min 和 y max 以使 80% 的点位于该区域的中间?当然,一个区域可能包含 98 个点(在本例中)。
解决方案
推荐阅读
- graphql - Shopify Graphql 产品媒体来源
- reactjs - 在 ReactJs 中迭代地图
- python - 如何密码保护我的 mlflow 门户
- google-apps-script - 如何使用脚本将实时(实时)数据从一个选项卡保存到另一个选项卡
- c# - EXCEL的C#OLEDB连接不能循环工作
- angular - 使用角度在 CRUD 表中添加值
- python - 如何使用分段模型库解决问题
- r - wordcloud 编码问题 R shinyapps.io,UTF-8 无法正确呈现
- java - Flux.onErrorContinue() 空对象
- python - sentimental analysis only for one review.. here's the code what supposed to be second argument for classifier.fit(new_X_test, )?