Dear R-Experts, I have the following command lines: windows() plot(0:60, 0:0.896, type="n", xlab="Zeit [min]", ylab="Absorptionsmessung bei 600nm",main="Zellwandstabilit?t" ) dev.off() Can anyone say me why the plot command does not work and how the correct one should look like? Important is: x-axis goes from 0 to 60 and the y-axis from 0 to 0.896! Thanks, Corinna
Schmitt, Corinna wrote:> Dear R-Experts, > > I have the following command lines: > > windows() > > plot(0:60, 0:0.896, type="n", xlab="Zeit [min]", ylab="Absorptionsmessung > bei 600nm",main="Zellwandstabilit?t" ) > > dev.off() > > > Can anyone say me why the plot command does not work and how the correct one should look like? > Important is: x-axis goes from 0 to 60 and the y-axis from 0 to 0.896!It does not work because the lengths of x and y differ. Try evaluating 0:0.896 at the command line. If you are just trying to set up the plotting region, you could do this: par(mar=c(4,6,4,4)) plot(0, 0, type="n", xlab="Zeit [min]", ylab="Absorptionsmessung bei 600nm", main="Zellwandstabilit?t", xlim=c(0,60), ylim=c(0,0.896))> Thanks, Corinna > > ______________________________________________ > R-help at stat.math.ethz.ch 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.-- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894
Hi, the length of the coordinates are different. Try: plot(seq(0,60, l=100), seq(0,0.896, l=100), type="n", xlab="Zeit [min]", ylab="Absorptionsmessung bei 600nm",main="Zellwandstabilität" ) -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O<http://maps.google.com/maps?f=q&hl=en&q=Curitiba,+Brazil&layer=&ie=UTF8&z=18&ll=-25.448315,-49.276916&spn=0.002054,0.005407&t=k&om=1> On 4/19/07, Schmitt, Corinna <Corinna.Schmitt@igb.fraunhofer.de> wrote:> > Dear R-Experts, > > I have the following command lines: > > windows() > > plot(0:60, 0:0.896, type="n", xlab="Zeit [min]", ylab="Absorptionsmessung > bei 600nm",main="Zellwandstabilität" ) > > dev.off() > > > Can anyone say me why the plot command does not work and how the correct > one should look like? > Important is: x-axis goes from 0 to 60 and the y-axis from 0 to 0.896! > > Thanks, Corinna > > ______________________________________________ > R-help@stat.math.ethz.ch 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. >[[alternative HTML version deleted]]
Thanks. I will try it. Perhaps it works. Corinna -----Urspr?ngliche Nachricht----- Von: Jim Lemon [mailto:jim at bitwrit.com.au] Gesendet: Donnerstag, 19. April 2007 15:16 An: Schmitt, Corinna Betreff: Re: [R] plotting command trouble Schmitt, Corinna wrote:> I know, but it is needed. Any other idea? >Hi Corinna, When you display a scatterplot, each X value must have a corresponding Y value. Otherwise where do you put the point? I think you may mean that you need 61 X values upon which you can plot 61 Y values. If you just want a sequence from 0 to 0.896 with 61 values: seq(0,0.896,length=61) This will plot with 0:60 as X values, or you can just use: plot(seq(0,0.896,length=61)) Jim