Adding simple legend to plot in R

后端 未结 1 1070
孤街浪徒
孤街浪徒 2020-12-14 06:13

I would like to create a very simple plot. I am using this data:

a <- read.table(\"https://dl.dropbox.com/u/22681355/a.csv\", sep=\',\', header=TRUE)

pl         


        
相关标签:
1条回答
  • 2020-12-14 06:56

    Take a look at ?legend and try this:

    legend('topright', names(a)[-1] , 
       lty=1, col=c('red', 'blue', 'green',' brown'), bty='n', cex=.75)
    

    enter image description here

    0 讨论(0)
提交回复
热议问题