My other advice is to reduce needless repetition. Within your ggplot ting code mydata is written out 3 times, as you dont use other data, having it once the first time is enough.
If you are stuck and want more specific help please try to make a reproducible example of your problem.