title: Cannot generate scatterplot in R. Printing plot returns NULL
body: <p>Unable to generate scatterplot, This is my code:</p>
  
  <pre><code>png(file = "MonthVsUniqueCode.png")
  
  p1&lt;-plot(x = month_UC$new.col,y = month_UC$UniqueCode,
  
       xlab = "Month",
       ylab = "UniqueCode",
       main = "Month Vs UniqueCode"
  )
  dev.off()
  
  print(p1)
  </code></pre>
  
  <hr>
  
  <p>Printing plot returns NULL.</p>
  
  <blockquote>
    <p>print(p1)
    NULL</p>
  </blockquote>
  
  <hr>
  
  <p>My Month_UC dataframe has 56003 rows and two columns (uniqueCode int, Month char)</p>
  
  <hr>
  
  <p>Note: I've just learnt R 4 hours back. What am I doing wrong?</p>