When plotting some lines via lines
to an existing plot object in plain R this works just fine. However, in R notebooks from Rstudio this will fail. How can I use this functionality in notebooks?
This has bit me in the rear many a time. What I found works is running all plot related lines at once (select and run) and not step-by-step. Alternatively you can press the green arrow (Run current chunk) or use Ctrl + Alt + c.
My RStudio version is 1.0.44.