tag:blogger.com,1999:blog-8707729708579170133.comments2023-07-15T03:45:58.257-07:00Learning RJimhttp://www.blogger.com/profile/17775174720796915716noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-8707729708579170133.post-39987867531347047082018-02-04T19:55:45.780-08:002018-02-04T19:55:45.780-08:00Hi there! I'm struggling a bit with trying to ...Hi there! I'm struggling a bit with trying to add the legend for my plot...wonder if you could help me out? I have three lines to add the labels for and they're differentiated by pattern instead of colour. Would appreciate any help!<br /><br />Here's the code I have so far:<br /><br />plot(Abundancel~Size, data=SizeSpectrumCG, xlim=c(7, 50), pch=as.numeric(Depth), bg="transparent",bty="l", main="Size Spectrum of Fish at Coral Garden", xlab = 'Total fish length (cm)', ylab = 'Log abundance')<br />lines(CG1m, predict(CG1m.lm, data.frame(Size=CG1m)), lwd=2,col="blue")<br />lines(CG5m, predict(CG5m.lm, data.frame(Size=CG5m)), lwd=2,lty="dashed",col="blue")<br />lines(CG10m, predict(CG10m.lm, data.frame(Size=CG10m)), lwd=2,lty="dotted",col="blue")<br />legend(3.0,50,c("1m","5m","10m")) <br /> lty=c(1,1,1),"solid","dashed","dotted"<br /> lwd=c(2,2,2),col=c("blue","blue","blue") <br />Crystlehttps://www.blogger.com/profile/02605645778178521415noreply@blogger.comtag:blogger.com,1999:blog-8707729708579170133.post-67210486213031954222017-05-14T23:48:27.263-07:002017-05-14T23:48:27.263-07:00I am very happy with your support.I am very happy with your support.Anonymoushttps://www.blogger.com/profile/13786760706825366477noreply@blogger.comtag:blogger.com,1999:blog-8707729708579170133.post-11698447116132635242017-05-14T23:21:02.753-07:002017-05-14T23:21:02.753-07:00thank you !!!
thank you !!!<br />Anonymoushttps://www.blogger.com/profile/13786760706825366477noreply@blogger.comtag:blogger.com,1999:blog-8707729708579170133.post-89802979252893390852016-09-23T06:06:56.689-07:002016-09-23T06:06:56.689-07:00Thank you.
Helped me a lot. Just one question rema...Thank you.<br />Helped me a lot. Just one question remains:<br />How do you create custom symbols for lty=c() in case you want to use marks like *,+,o that are measured points in the graphic?Rkurssihttps://www.blogger.com/profile/02621255028575627500noreply@blogger.comtag:blogger.com,1999:blog-8707729708579170133.post-18421613193824547912010-03-29T05:27:19.022-07:002010-03-29T05:27:19.022-07:00Norman - Thanks. All I'm really doing is writi...Norman - Thanks. All I'm really doing is writing about stuff as I learn them. It's both a memory reinforcement and a reference for myself.Jimhttps://www.blogger.com/profile/17775174720796915716noreply@blogger.comtag:blogger.com,1999:blog-8707729708579170133.post-86167581967082565302010-03-28T11:30:41.045-07:002010-03-28T11:30:41.045-07:00thanks for the blog. As a R newb you are presentin...thanks for the blog. As a R newb you are presenting practical info in small enough bites that I can understand itNorman Albertson, MDhttps://www.blogger.com/profile/00321269217195274242noreply@blogger.com