Error in axis(side = 1, at = 1:10, seq(0.1, 1, 0.1)) : plot.new has not been called yet

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: