R語言 -- Q&A

http://f.dataguru.cn/thread-121937-1-1.html


我運行> lines(density(r),col="blue") 命令 得到下面這個錯誤

Error in plot.xy(xy.coords(x, y), type = type, ...) : 
  plot.new has not been called yet

請問怎麼解決啊?

要先用 plot 函數繪出圖形,才能調用 lines 函數
或者說,如果還沒繪出圖形(不限於是否使用 plot),那麼無法調用 lines 函數

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章