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

Add background for scale bars and north arrows. #113

Open
lucas-johnson opened this issue Feb 10, 2023 · 2 comments
Open

Add background for scale bars and north arrows. #113

lucas-johnson opened this issue Feb 10, 2023 · 2 comments

Comments

@lucas-johnson
Copy link

Thanks for a great package! I use this all the time, and it makes things so much easier.

I'm wondering if you might add a feature to put a solid color behind your scale bars or north arrows, to make them stand out a bit against different datasets.

@paleolimbot
Copy link
Owner

That is a great idea!

The arrow itself gets created here: https://github.com/paleolimbot/ggspatial/blob/master/R/annotation-north-arrow.R#L148-L157 ...off the top of my head I don't remember how to make a gTree has a background but it's probably something like gTree(..., gp = gpar(fill = "the backround color"))

I probably won't get to implementing this and releasing ggspatial again for a few months. If you're interested in taking a stab at it I'd be happy to review!

@paleolimbot
Copy link
Owner

...actually, I'm thinking now that the easiest way is a adding grid::rectGrob() with fill = "background color" to the back of the subgrob list 😬

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

No branches or pull requests

2 participants