Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make goals a different colour to the pitch #2

Open
Torvaney opened this issue Apr 22, 2018 · 3 comments
Open

Make goals a different colour to the pitch #2

Torvaney opened this issue Apr 22, 2018 · 3 comments
Assignees

Comments

@Torvaney
Copy link
Owner

It looks weird having a green pitch and green goals (as in README.md).

@Torvaney Torvaney self-assigned this Apr 22, 2018
@Torvaney
Copy link
Owner Author

Torvaney commented Jul 2, 2018

Maybe decompose annotate_pitch into annotate_markings() + annotate_goals(style = ...) to allow different goal styles (or have different annotate_goal_* functions).

Would also prevent code duplication for markings at either end of the pitch.

@Torvaney
Copy link
Owner Author

Torvaney commented Jul 6, 2018

Actually, decomposing all the different markings into annotate_* functions seems like maybe the best solution (if we do go down this route). Could be a pain for users if an argument is applied to all of them (like x_scale), but this could be solved by either supporting !!! list expansion (maybe ggplot 3.0.0 does this out of the box?).

This would allow more flexible plotting against different (non-Opta) specifications as well.

@Torvaney
Copy link
Owner Author

Torvaney commented Jan 9, 2021

Latest change (0.1.7) helps with this by adding arbitrary goal functions, but it's still not as nice as I'd like. For one thing, the colour is still locked to the colour of the pitch (unless you create your own function where colour and fill have different names). So I'll leave this open for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant