grantmcdermott / tinyplot

Lightweight extension of the base R graphics system
https://grantmcdermott.com/tinyplot
Apache License 2.0
208 stars 7 forks source link

Should we support a "fill" argument as an alias for "bg"? #70

Closed grantmcdermott closed 10 months ago

grantmcdermott commented 10 months ago

My sense is that bg is not well known among non-dedicated base plot users.

From a practical perspective, I often find myself mistyping by = "by" (instead of bg = "by") by mistake :-/

Having the fill = "by" fallback is something I'm likely to mistype less often.

vincentarelbundock commented 10 months ago

My 2 cents (weakly held):

I get what you're saying, but thought that the package's design goal was to stick as close as possible to base. In general, I'm not a big fan of aliases, so if there's already an argument, I'd lean on document and vignettes instead of inventing a new non-Base name.

zeileis commented 10 months ago

I'm not sure. I can see both of your arguments. I'll add a couple of comments which are probably not overly helpful...

grantmcdermott commented 10 months ago

Thanks both. Definitely appreciate the feedback. I'm finding it hard to let this one slide. I'll mull it over this weekend some more and keep open for now.

grantmcdermott commented 10 months ago

Okay, after thinking it over for a few days I'm still quite motivated to add fill as an alias for bg.

(Sorry @vincentarelbundock. But at least you said your views were weakly held so hopefully this won't be too annoying!)

In my view, doing so would still allow the package to be consistent with base plot, since the bg behaviour would be preserved regardless. @zeileis brings up a good point of comparison vis-a-vis grid and I honestly can't think of any other functionality that I'd want to role into a "fill" argument otherwise. (Although, at some point we may consider supporting "density" and "angle" arguments to handle non-solid fill.)