Look at the updateusr function in the TeachingDemos package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111
> -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of snowboarder101 > Sent: Thursday, April 07, 2011 12:38 PM > To: r-help@r-project.org > Subject: Re: [R] Alignment of lines within barplot bars > > Hi, > > I am dealing with a similar issue, I am trying to use a barplot in > conjunction with some points plotted and want to line the two up. This > all > works fine, but I am dealing with the additional complication that I > have > two y-ranges. The barplot is based on one range, while the points are > based > on another. The way I have been dealing with this is to use barplot(), > and > then use a par(new=T), and then do the plot. So I have axis(2) with the > points, and axis(4) with the barplot values. However, the points don't > line > up. When I do it the other way and do barplot(), points() with the > barplot() > x coordinates, the range isn't correct, and not all points appear. > > I can force barplot() to use my range of points, but then the bars are > too > small. I can also try to normalize my points to be in the same range as > the > barplot() data, but then I have issues labeling it appropriately. That > is, > my axis(2) is incorrect, and I need this whole thing to function > dynamically > in a function, so I can't explicitly list the labels. > > Any thoughts on this would be appreciated. > > -- > View this message in context: http://r.789695.n4.nabble.com/Alignment- > of-lines-within-barplot-bars-tp2533115p3434209.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.