GGplot Legend Showing Blank Fill for Missing Factor Level
I am trying to use ggplot
to plot a frequency plot where the dropped values still show in the legend. I have been able to achieve this by setting drop = FALSE
in scale_fill_manual
, however the dropped field has no color in the legend even though I have explicitly set it. I have created an example similar to my data below. In this example I am looking for Male to show in the legend with the color set in scale_fill_manual
, but I cannot seem to figure out how to do this.