Plot recorded with recordPlot() not showing in Rnotebook

Hey, I originally asked this question on stackoverflow but with no luck so far. I was wondering if someone here could help. Here is the link for the original question.

I am having trouble displaying plots inline on R notebook that I have created using the recorPlot() function. The chunks run without error but the recorded does not show. Below is a toy example. The second chunk does not output the plot inline, as I would expect. But if I run the line on the console, the plot is displayed in the plot window. Does anyone have any idea on how to fix it?

I am using: R version 3.6.1 (2019-07-05) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.3 LTS

title: "R Notebook"
output: html_notebook

```{r, echo=FALSE}
plt_list = list()
for (i in 1:3){
    plot(c(i, i+1, i+2))
    plt_list[[i]] = recordPlot()