我正在制作篮球投篮图。我需要弄清楚如何在背景中实际绘制篮球场的轮廓。有任何想法吗?

最佳答案

以下代码用于获取此图像:


ggplot(shots,aes(X,Y))+ stat_binhex(binwidth = c(3,3))+
geom_point(大小= 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(数据=场,aes(x,y),颜色=“ white”,大小= 2)



geom_path命令中的数据包含白色法院图的(x,y)坐标。

07-24 09:52
查看更多