Dear all, i need some help with plotting. the specific problem is the following: #FYI a=100 b=95 d=94.5 e=70 all=c(a,b) all2=c(d,e) plot(all,type="b",col="blue",xlim=c(1,4),ylim=c(20,150)) lines(all2,type="o",col="yellow") this does work so far, but ... i´d like to have 4 intersects, just named by characters.. no scale please. the second problem is, i am trying to start the second vector where the first vector stops (same point on the x-axis - y is different ;) ) admittedly all this sounds quite basic, but i couldnt get a long with it for a while. if somebody knows a good manual about graphics in R, i´d be happy if you let me know. thanks in advance ! matthias [[alternative HTML version deleted]]
maybe this is what you want: plot(all~c(1:2),type="b",col="blue",xlim=c(1,4),ylim=c(20,150),pch=c("a","b"),yaxt="none") lines(all2~c(2:3),type="o",col="yellow",pch=c("d","e")) for some manuals, look at the contributed documents section at the R homepage Bart ran2 wrote:> > Dear all, > > i need some help with plotting. > > the specific problem is the following: > > #FYI > a=100 > b=95 > d=94.5 > e=70 > > all=c(a,b) > all2=c(d,e) > plot(all,type="b",col="blue",xlim=c(1,4),ylim=c(20,150)) > lines(all2,type="o",col="yellow") > > > this does work so far, but ... > i?d like to have 4 intersects, just named by characters.. no scale > please. > the second problem is, i am trying to start the second vector where > the first vector stops (same point on the x-axis - y is different ;) ) > > admittedly all this sounds quite basic, but i couldnt get a long with > it for a while. if somebody knows a good manual about graphics in R, > i?d be happy if you let me know. > > thanks in advance ! > > matthias > [[alternative HTML version deleted]] > > > ______________________________________________ > R-help at 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. > >-- View this message in context: http://www.nabble.com/plotting-help-needed-tp14697049p14707893.html Sent from the R help mailing list archive at Nabble.com.
Try plot(1:2,all,type="b",col="blue",xlim=c(1,4),ylim=c(20,150),xaxt='n',yaxt='n') lines(2:3,all2,type='o',col='yellow') I don't really know what you mean by "4 intersects, just named by characters". By "no scale please" I assume you mean tick marks and tick mark labels on the axes, and that's what the xaxt='n' and yaxt='n' are for. See help('par') for more options to control how plots appear. -Don At 8:24 PM +0100 1/8/08, bunny , lautloscrew.com wrote:>Content-Type: text/plain >Content-Disposition: inline >Content-length: 772 > >Dear all, > >i need some help with plotting. > >the specific problem is the following: > >#FYI >a=100 >b=95 >d=94.5 >e=70 > >all=c(a,b) >all2=c(d,e) >plot(all,type="b",col="blue",xlim=c(1,4),ylim=c(20,150)) >lines(all2,type="o",col="yellow") > > >this does work so far, but ... >i?d like to have 4 intersects, just named by characters.. no scale >please. >the second problem is, i am trying to start the second vector where >the first vector stops (same point on the x-axis - y is different ;) ) > >admittedly all this sounds quite basic, but i couldnt get a long with >it for a while. if somebody knows a good manual about graphics in R, >i?d be happy if you let me know. > >thanks in advance ! > >matthias > [[alternative HTML version deleted]] > > >______________________________________________ >R-help at 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.-- -------------------------------------- Don MacQueen Environmental Protection Department Lawrence Livermore National Laboratory Livermore, CA, USA 925-423-1062