Re: [R] Problems with graphics

From: Petr Pikal <petr.pikal_at_precheza.cz>
Date: Tue 03 Oct 2006 - 08:49:15 GMT


Hi

Well, you did not specified what you have tried to do and how did you fail but

On 2 Oct 2006 at 16:41, Christophe Nguyen wrote:

Date sent:      	Mon, 02 Oct 2006 16:41:29 +0200
From:           	Christophe Nguyen <Christophe.Nguyen@bordeaux.inra.fr>
To:             	r-help@stat.math.ethz.ch
Subject:        	[R] Problems with graphics

> Dear all,
> I am a SAS user, who's trying R. I am a little bit lost for graphics.
> What is the simplest way for plotting y as a function of x with one
> symbol (line or dot) for each level of a class variable z (for SAS

If z is factor
plot(x,y pch=as.numeric(z), ...)

otherwise you need to change it to one.

BTW, you can use the similar approach with lines and points - col, lwd, cex,... and othe parameters.

> langage= plot x*y=z). Can I add vertical bars for standard deviation

there are various options, one is to use arrows with angle=90.

arrows(x,y,x, y+ystd, angle=90)

> stored in a separate variable (say ystd). Finally, is it possible to
> do all this with xyplot function arranging plots according to A and B
> factor: xyplot(y~x|A*B) with as many plots and symbol as there is

that is completely different story and you probably need to elaborate your own panel.function.

HTH
Petr

> levels in the z variable for each panel? Thanks for the help. Chris
>
> --
> ___________________________________________________
>
> Christophe NGUYEN
>
> UMR 1220 INRA-ENITAB
> Transfert sol-plante et cycle des éléments minéraux
> dans les écosystèmes cultivés"
>
> Centre INRA de Bordeaux-Aquitaine
> 71, avenue Edouard Bourlaux, BP 81
> 33883 Villenave d'Ornon, FRANCE
>
> Tel : 00 33 (0)5 57 12 25 07
> Fax : 00 33 (0)5 57 12 25 15
>
> email : Christophe.Nguyen@bordeaux.inra.fr
> page infoservice: http://www.bordeaux.inra.fr/tcem
>
> __________m°O°m____________________________________
>
> ______________________________________________
> 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.

Petr Pikal
petr.pikal@precheza.cz



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. Received on Tue Oct 03 18:54:43 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 04 Oct 2006 - 06:30:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.