Hi all, the option type="h" in plot() makes nice vertical (histogram-like) lines. Is there a way to make similar, horizontal lines? I can of course resort to using lines() multiple times, but i was hoping that there is a more elegant solution. thanks, Remko Duursma Ph.D. student Dept. Forest Resources Forest Biometrics Lab University of Idaho, Moscow, ID.
On Wed, 26 Feb 2003, Remko Duursma wrote:> Hi all, > > the option type="h" in plot() makes nice vertical (histogram-like) > lines. Is there a way to make similar, horizontal lines? I can > of course resort to using lines() multiple times, but i was hoping > that there is a more elegant solution.Yes - turn your head sideways. But, seriously, for hardcopy plots I have been known to rotate all the text and all the labels, and use axis() commands to reverse the left-to-right ordering of labels along an axis, in order to get a plot that I could turn sideways after it was printed. - tom blackwell - u michigan medical school - ann arbor -> > thanks, > > Remko Duursma > > > > Ph.D. student > Dept. Forest Resources > Forest Biometrics Lab > University of Idaho, Moscow, ID. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/r-help >
Remko Duursma wrote:> Hi all, > > the option type="h" in plot() makes nice vertical (histogram-like) lines. Is there a way to make similar, horizontal lines? > > I can of course resort to using lines() multiple times, but i was hoping that there is a more elegant solution. > > thanks, > > Remko DuursmaI guess you are looking for ?segments. Uwe Ligges
Hi all, two solutions for horizontal high-density lines were suggested: Use plot(..., type="h") and turn your head sideways. This turned out to be a pain in the neck ;-). But it sure works! segments() sure does the trick, for example y <- runif(10) x <- 1:10 plot(x,y,type='n') segments(x0=0, y0=y, x1=x, y1=y, col="red") thanks for the help! Remko -- On Thu, 27 Feb 2003 08:30:00 Uwe Ligges wrote:>Remko Duursma wrote: >> Hi all, >> >> the option type="h" in plot() makes nice vertical (histogram-like) lines. Is there a way to make similar, horizontal lines? >> >> I can of course resort to using lines() multiple times, but i was hoping that there is a more elegant solution. >> >> thanks, >> >> Remko Duursma > >I guess you are looking for ?segments. > >Uwe Ligges > >______________________________________________ >R-help at stat.math.ethz.ch mailing list >http://www.stat.math.ethz.ch/mailman/listinfo/r-help >