Open jonocarroll opened 6 years ago
My most visited stack overflow answer! also, my brain refuses to interpret ggeasy as anything other than greasy
Mine too. Also drob's and a few other big wigs' I'm told. We can make this better.
I will gladly work on this as greasy
.
No matter how many times I try, my brain just does not remember this one. Every damn time I have to look it up. I remember finding a pretty good tool for the x-axis, but I think it was when I wanted to do a coord-flip ggplot I found I couldn't do the same for the y-axis. I'm personally invested in improving this one, count me in.
Me: this chart would look better if the tick labels were rotated
My brain:
I like this one. I have
theme(axis.text.x = element_text(angle = 90, vjust = 0.5))
stored in a note on my laptop, but it is a pain to have to find it and paste it into code. My brain also refuses to memorise the horrible syntax.
The extensions probably don't even need a _theme__ prefix?
theme_
isn't a strict requirement, but I'd like a way to distinguish these helpers from standard ggplot2
syntax so that they'll be recognised as such. Even easy_label_x_vertical()
would be neat. People won't always write ggeasy::label_x_vertical()
.
Given that this one's fairly easy to implement, three options would be
The CRAN route would be neat because it's a non-trivial component of package making in and of itself. I do a lot of testing when I submit, so rhub
, travis
, appveyor
, devtools
(check()
, test()
, build_win()
), testthat
, and covr
all come into play.
@jonocarroll Did this get taken up at the Unconf? I'd be interested in putting together such a package or helping out with an existing effort if one is underway
It didn't, though there was interest. I started the package myself on the flight home but haven't uploaded anything yet. I'll do that tonight and add you as a collaborator (and @adam-gruer since he mentioned he was also interested). Should be do-able. I'm happy to add @softloud and @timchurches too if you're interested.
Awesome, thanks! I think it'd be great to get things going by adding issues in ggeasy for each helper that might be a good candidates to include. I'll get that started with a few issues.
If anyone's still watching this issue, https://github.com/jonocarroll/ggeasy is now a thing (and it's looking fantastic). If you'd like to contribute you're most welcome to join. I'm also starting a channel in my slack for developer discussions; let me know and I'll add you.
This didn't seem to gather any interest in
ggplot2
itself so perhaps this is a good unconf project?The idea is that
theme(axis.text.x = element_text(angle = 90, vjust = 0.5))
is horrible to remember, but if we had
then we might actually remember what we want (plus autocomplete FTW).
We could make a
ggeasy
package which contains a heap of extension helpers, aliasing extras as needed.magrittr
has a nice set of aliases which I use all the time (refer?magrittr::extract
for everyone who isn't already @smbache).This would: