Thank you so much but I now get a new error
> DF <- data.frame(X = c(7,47,10,26,6,30,25,23,22,29),
+ Y = c(13,6,18,20,4,25,9,6,6,25),
+ Result = c(1.0,1,0,0,0,1,0,1,0, 1),
+ Pxy = c(1.0, 0.5, 0, 0.5, 0, 0.5, 0.5, 1.0, 0.5, 1.0))
> ggplot(DF, aes(x=X, y=Y)) +
+ annotation_custom(court, 0, 50, 0, 47) +
+ geom_point(aes(colour = "red", shape = Result)) + scale_shape_identity() +
+ xlim(0, 50) +
+ ylim(0, 47)
Error in y[setdiff(names(y), names(x))] :
object of type 'closure' is not subsettable