You can't mix base R plot commands with ggplot2 commands. 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:
I'm sorry, but I'm now trying replex, and have little problem.
Am I shoule copy all codes and run reprex() or just copy error code? Because just before I copy all codes and run reprex(), and now my rstudio cloud is keep loading..
thanks, i understand. and really sorry but now in my console, the blue word 'selection:' is not deleted. i can't erase this by backspace and i don't know why it appeared...