[R] Bar width and labels in barchart

From: Spilak,Jacqueline [Edm] <Jacqueline.Spilak_at_EC.gc.ca>
Date: Wed, 23 Jan 2008 11:53:19 -0700


Hi everyone
I am using barchart to make my graphs. Here is my code.

barchart(percent_below ~ factor(Year)| factor(Season, levels=unique(Season)),

      data= .season_occurrence, origin = 0, layout = c(4, 1), scales=list(tick.number=ticknum,labels=NULL), ylim=c(0, ymax),

        group = factor(Year), xlab= "Year", auto.key = list(points = FALSE, rectangles = TRUE,space="right",size=2,cex=0.8),

        upper_2007 = c(upper_limit_winter, upper_limit_spring, upper_limit_summer, upper_limit_autumn),

        par.settings = list(superpose.polygon = list(col=c(color1,color2,color3,color4,color5,color6,color7,color8))),

        lower_2007 = c(lower_limit_winter, lower_limit_spring, lower_limit_summer, lower_limit_autumn),

      panel = function(..., upper_2007,lower_2007) {
            panel.abline(h = upper_2007[packet.number()])
		panel.abline(h = lower_2007[packet.number()])
            panel.barchart(...)
         })

This code gives me a graph with four panels, one for each season, and then the percent_below is shown per year in each panel. I wanted each year to have a color associated with it so I added group = factor(Year) this worked and gave me what I wanted, however now the bars are very skinny and it is hard to distinguish the colors. How do I make them wider? My other question is that on the x-axis it list all years (2000-2007, inclusively) for each panel and they are squished and non-legable, can I get rid of them? They are not necessary as I have the years color coded with the legend at the side. Thanks for your help in advance
Jacquie

        [[alternative HTML version deleted]]



R-help_at_r-project.org 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 Wed 23 Jan 2008 - 18:56:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 24 Jan 2008 - 17:30:08 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.

list of date sections of archive