Check out example codes for "turn legend off ggplot2". It will help you in understanding the concepts better.

Code Example 1

bp + theme(legend.position="none")

Learn ReactJs, React Native from akashmittal.com