[R] Plot and Boxplot in the same graph

Paul Johnson pauljohn32 at gmail.com
Sat Mar 21 07:43:30 CET 2009


On Fri, Mar 20, 2009 at 10:02 PM, johnhj <jharris at web.de> wrote:
>
> Hii,
>
> 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....
>
> Is it possible to do it in this way ?
>
> greetings,
> johnh
> --
>
Run the boxplot first, then use points() or other subsidiary plot
functions to add the points in the figure.

> y <- rnorm(100)
> x <- gl(2,50)
> boxplot(x,y)
> points(x,y)


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas




More information about the R-help mailing list