I'm not sure I understand your question "How can I remove the legends for the first and second plots", there is no legend in the second plot. Maybe you mean "first and third plots"? If so, just add the line
theme(legend.position="none")
to the first and third ggplot statements.
Cheers
Steen