Tidyeval and if-statement in ggplot wrapper

That's great! Thank you for your helpful explanation.

It works perfect for me. The way I see it, with {{ }} you can follow the same Syntax with ggplot2 & dyplr in functions as in interactive sessions?

Here is another post with further information on this topic.
Referencing variables in functions using {{}}