[R] Plot and Boxplot in the same graph

JiHO jo.lists at gmail.com
Sun Mar 22 02:45:39 CET 2009


On 2009-March-20  , at 23:02 , johnhj wrote:

> Is it possible, to use the plot() funktion and the boxplot() funktion
> together ?
> I will plot a simple graph and additionally to the graph on certain  
> places
> boxplots. I have imagined to plot the graph a little bit  
> transparency and
> show in the same graph on certain places boxplots....

If you don't mind letting got the base graphics in R, you can look  
into http://had.co.nz/ggplot2/

The representations you are interested in are geom_jitter and  
geom_boxplot and in the help page of geom_jitter there is an example  
of specifically what you just asked:
	http://had.co.nz/ggplot2/geom_jitter.html
look at the end. As for transparency, you can use  
geom_boxplot(fill=alpha("white",0.5)) for example.

JiHO
---
http://jo.irisson.free.fr/




More information about the R-help mailing list