gpt4 book ai didi

r - 鼠标点击数据的热图式图

转载 作者:行者123 更新时间:2023-12-01 13:52:40 25 4
gpt4 key购买 nike

我有一大堆鼠标点击的 x 和 y 坐标。下面是这些坐标的简单散点图。

enter image description here

如您所见,显然,似乎有3个区域的点击相对比较集中。我想以反射(reflect)点击相对集中的方式绘制这些点击 - 例如,点击高度集中的区域中的圆圈相对较大或颜色较深。显然,一个简单的散点图并不能说明这一点。我尝试遵循以下 post ,但结果不是我想要的。

因此,我们将不胜感激任何建议。

最佳答案

这些对你有用吗?

## scatter
plot(quakes$long, quakes$lat)

enter image description here

library(hexbin)
plot(hexbin(quakes$long, quakes$lat))

enter image description here

library(ggplot2)
ggplot(quakes, aes(x = long, y = lat)) + stat_density2d(aes(alpha = ..level..), geom = "polygon")

enter image description here

ggplot(quakes, aes(x = long, y = lat)) + stat_density2d(aes(fill = ..density..), geom = "tile", contour = FALSE)

enter image description here

library(MASS)
filled.contour(kde2d(quakes$long, quakes$lat))

enter image description here

关于r - 鼠标点击数据的热图式图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22442478/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com