我正在制作篮球投篮图表。我需要弄清楚如何在背景中实际绘制篮球场的轮廓。有任何想法吗?
Evan Zamir
问问题
1112 次
1 回答
7
以下代码用于获取此图像:
ggplot(shots, aes(X,Y)) + stat_binhex(binwidth=c(3,3)) + geom_point(size=3, alpha=0.5, aes(color=RESULT), position="jitter") + coord_equal() + theme_grey() + opts(title="金州勇士队 2012 投篮图") + geom_path(data=ft_line, aes(x,y), colour="white", size=2) + geom_path(data=court, aes(x,y), colour="white", size=2)
geom_path 命令中的数据包含白色球场图的 (x,y) 坐标。
于 2012-10-09T15:03:33.757 回答