Closed Torvaney closed 1 year ago
@lvanden - I can't add you as a reviewer (I think I might need to add you as a "collaborator" or something for that?), but I thought I'd put this up as a PR in case you wanted to have a look.
(It's a little late, but in my defence, I didn't say which Christmas break I would have some time in! 😅)
This PR makes a few main changes to enable additional pitch aesthetics. Taken all together it's quite large, and I should have broken it up, but the key changes are more or less contained in a few commits which will be easier to browse than the full diff:
geom_curve
to draw penalty box arcs (instead of drawing a full circle withgrid::circleGrob
): https://github.com/Torvaney/ggsoccer/commit/e991106a1c1a30a00cb630caff9375dc65b6d6a6linewidth
,alpha
,linetype
aesthetics to the arguments forannotate_pitch
: https://github.com/Torvaney/ggsoccer/commit/8cb51b8e8dbfc2e3ec65f478fe0ad78e1b449755geom_segment
s (instead ofgeom_rect
), so that there's no overlap with the whole-pitch outline (would interfere withlinetype
): https://github.com/Torvaney/ggsoccer/commit/a5e925f282f01344a706d5bbcdb2f634c6cac6a0NB: I also used
linewidth
as the top-level aesthetic oversize
(https://github.com/Torvaney/ggsoccer/commit/0af098a0bd9e3e63c6da89df5c4115a951db4f54), since this was deprecated for lines in the latest ggplot2 release (3.4.0), although the points (penalty spots and centre point) takesize = linewidth
as well.Some example images of what this looks like with different aesthetics:
Created on 2022-11-30 with reprex v2.0.2
Closes #10, closes #17, closes #18, and closes #23