[R] Help with barplot
Jacques VESLOT
jacques.veslot at cirad.fr
Fri Feb 24 07:50:16 CET 2006
par(mar=par()$mar+c(0,3,0,0))
with(x, barplot(structure(Median, names=as.character(City)),horiz=T,las=2))
matgopa1 at umbc.edu a écrit :
>Hello all,
>
>I need to create a horizontal barplot with the following data:
>
>City Median
>
>Springfield 34
>Worcester 66
>Fitchburg 65
>Lowell 63
>Quincy 62
>Boston 36
>Cambridge 54
>Waltham 42
>Medford 52
>Pittsfield 65
>Rensselaer 60
>Schenectady 56
>Glens Falls 64
>
>The code below produces the bars for the Median, but how or where do I
>specify the corresponding city name on the y-axis for the bars.
>
>x<-data.frame(City=ozone.ne.trim$City,Median=ozone.ne.trim$Median)
>with (x,
> barplot(Median,horiz=TRUE))
>
>Please help.
>Mathangi
>
>______________________________________________
>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
>
>
>
More information about the R-help
mailing list