try this: plot(tp,dp, type= 'l',ylim=rev(range(dp)))
On Wed, Sep 23, 2009 at 7:58 AM, FMH <kagba2...@yahoo.com> wrote: > Dear All, > > Let: > dp: depth of the river > tp: temperature with respect to depth > > We can have a simple scatter plot, between depth as y-axis and temperature as > x-axis, by using a plot function as shown below. > > ##################### > dp <- c(1,4,3,2,5,7,9,8,9,2) > tp <- 1:10 > plot(tp,dp, type= 'l') > ##################### > > Could someone advice me on the way to plot the same pair of observations, but > with depth in descending order from the origin. Instead of depth, I tried to > simply use rev(depth), but the result was bizarre. > > Thank you > Fir > > > > > ______________________________________________ > 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. > -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? ______________________________________________ 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.