Managing legend on ggplot2 plot with multiple graph types


To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:

Have in mind that you are describing an issue with ggplot2 not related to shiny even if you are using ggplot() inside a shiny app.