Open
Description
ggplot_add.list()
adds each element of the list using %+%
instead of +
here:
Lines 156 to 161 in ca47270
The idea is that ggplot() + list(e1, e2, e3)
should be the same as ggplot() + e1 + e2 + e3
, but this is not true if someone (😇) wanted to create a gg subclass with a custom +
method.
I'm not sure why that code uses %+%
instead of +
. I modified the code and run tests both ways and everything passes. This logic has been since 3c16f9c from 2017
Would it be possible to change ggplot_add.list()
to use the +
generic? Barring that, would it be possible to make %+%
an exported generic (same as +
)?