Issue with ggplot2 Legend

Hi, I have a blank item in the legend for this plot and I cannot find out how to remove it.

I tried this code
scherzer$pitch_name <- na.omit(scherzer$pitch_name)

However, that did not seem to do anything. Thank you.

Very likely pitch_name is a factor variable and has and empty level that you can drop.

scherzer$pitch_name  <- droplevels(scherzer$pitch_name )

If that doesn't work, please provide a reproducible example for your issue including sample data.

1 Like

That worked. Thanks for your help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.