I have a function that has a parameter named "Legend". I'm trying to use this parameter in the mapping=aes(. statement in ggplot inside of the layer function. I've tried the following:
mapping=aes(x = carat, y = price, color = Legend),
mapping=aes(x = carat, y = price, aes_string(color = Legend)),
mapping=aes(x = carat, y = price, color = substitute(Legend))
All of these say "object 'Legend' not found" Is there any solution to this problem?