I am trying to make the lines thicker in a graph (for a ppt presentation). Here is what I currently have: plot(x,y,type="l", ylab="Number of OTUs", xlab="Number of Samples Collected", col="Black", pch=1, ylim=c(0,6000)) points(x, Sobs$Chao_1_Mean, type="l", col="Gray", pch=1) (this is one of the added lines in the graph). I believe cex can help increase the size of the points. But I haven't been able to get it to work. -- View this message in context: r.789695.n4.nabble.com/how-to-make-plot-lines-thicker-tp4635875.html Sent from the R help mailing list archive at Nabble.com.
I'd suggest using lines() rather than points() to add lines to a plot. The parameter to change line width is lwd rather than cex. e.g. lines(x, Sobs$Chao_1_Mean, col="Gray", lwd=2) Reading ?par can be both an enlightening and confusing experience. Sarah On Mon, Jul 9, 2012 at 1:11 PM, peziza <jenkerekes at gmail.com> wrote:> I am trying to make the lines thicker in a graph (for a ppt presentation). > > Here is what I currently have: > > plot(x,y,type="l", ylab="Number of OTUs", xlab="Number of Samples > Collected", col="Black", pch=1, ylim=c(0,6000)) > > points(x, Sobs$Chao_1_Mean, type="l", col="Gray", pch=1) (this is one of the > added lines in the graph). > > I believe cex can help increase the size of the points. But I haven't been > able to get it to work. > >-- Sarah Goslee functionaldiversity.org
?par and have a look at lwd John Kane Kingston ON Canada> -----Original Message----- > From: jenkerekes at gmail.com > Sent: Mon, 9 Jul 2012 10:11:32 -0700 (PDT) > To: r-help at r-project.org > Subject: [R] how to make plot lines thicker > > I am trying to make the lines thicker in a graph (for a ppt > presentation). > > Here is what I currently have: > > plot(x,y,type="l", ylab="Number of OTUs", xlab="Number of Samples > Collected", col="Black", pch=1, ylim=c(0,6000)) > > points(x, Sobs$Chao_1_Mean, type="l", col="Gray", pch=1) (this is one of > the > added lines in the graph). > > I believe cex can help increase the size of the points. But I haven't > been > able to get it to work. > > > -- > View this message in context: > r.789695.n4.nabble.com/how-to-make-plot-lines-thicker-tp4635875.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.____________________________________________________________ FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
These sorts of parameters are all documented under ?par, but it's a bit of a beast to read. The one you are looking for is lwd To wit layout(1:2) plot(1:5, type = "l") plot(1:5, type = "l", lwd = 3) Best, Michael On Mon, Jul 9, 2012 at 12:11 PM, peziza <jenkerekes at gmail.com> wrote:> I am trying to make the lines thicker in a graph (for a ppt presentation). > > Here is what I currently have: > > plot(x,y,type="l", ylab="Number of OTUs", xlab="Number of Samples > Collected", col="Black", pch=1, ylim=c(0,6000)) > > points(x, Sobs$Chao_1_Mean, type="l", col="Gray", pch=1) (this is one of the > added lines in the graph). > > I believe cex can help increase the size of the points. But I haven't been > able to get it to work. > > > -- > View this message in context: r.789695.n4.nabble.com/how-to-make-plot-lines-thicker-tp4635875.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Thanks, that worked! -- View this message in context: r.789695.n4.nabble.com/how-to-make-plot-lines-thicker-tp4635875p4635929.html Sent from the R help mailing list archive at Nabble.com.