What seems to be the standard source of this error is that your Plots panel window in the RStudio IDE is too small to support your plot. Try making that Plots window larger and running the code again.
Error replication:
Solved