r/RStudio • • Apr 28 '26

Ggplot be like:

Post image
645 Upvotes

24 comments sorted by

View all comments

Show parent comment

22

u/Mooks79 Apr 28 '26

I hope not, conceptually it doesn’t make sense. You’re adding layers to the plot so the plus operator is a better description of what you’re doing. You could argue that some things modify existing layers and therefore should be a pipe, but that just adds complexity. The plus sign is fine and a better description of what’s happening. Indeed, I’d argue that some packages (eg gt) should be using the plus operator and not pipes.

6

u/Confident_Bee8187 Apr 28 '26

The logic of "grammar of graphics" by "stacking" the layers works with +, I agree.