r - ggplot2 中带有 geom_text_contour 的标签上的小数点太多
问题描述
geom_contour_fill
我需要通过添加标签来绘制 ggplot 中的多个数据集geom_text_contour
,有时还会生成带有多个小数的标签。
例如对于这个数据集:
library(ggplot2)
library(metR)
df <- read.csv("dataint.csv")
ggplot(df, aes(x = x, y = y, z = z)) +
geom_contour_fill() +
geom_text_contour(check_overlap = TRUE, stroke = 0.1, size = 3)
解决方案
推荐阅读
- python - 在 python 中的字符串格式化期间,不是所有的参数都被转换
- dataframe - if 语句:如果数据点的数量小于 x 则返回 NaN 否则计算数据帧的年化回报
- javascript - 流类型:可扩展的 React 组件道具类型
- python - 即使在从 python 脚本在 linux 中执行脚本之后也永久设置环境变量
- apache-spark - 如何在 Spark Streaming 应用程序中对通过 Kafka 发送的 Hive 表执行查询?
- python - 无法在 python 中使用 pywinauto 自动单击“Oracle VM 虚拟框”按钮
- node.js - 如何在 Sequelize 中忽略 SequelizeUniqueConstraintError?
- python - 沿特定列对 ndarray 进行排序
- amazon-web-services - 在 PowerShell 配置文件中设置 AWSProxy
- python - Pandas - 比较时从字典中获取相应的值