[Rd] barchart fails when grouping variable has more than 7 levels (PR#7293)

kiermeier.andreas at saugov.sa.gov.au kiermeier.andreas at saugov.sa.gov.au
Tue Oct 19 04:47:20 CEST 2004


Full_Name: Andreas Kiermeier
Version: 2.0.0
OS: Windows XP
Submission from: (NULL) (203.26.122.12)


I've struck a problem drawing barcharts after installing R 2.0.0. Previously
I've used the following command

print(barchart(100*result ~ sample,
               groups=congener,
               data=dioxin.2003.fresh.ub.p, stack=TRUE, ylim=c(0,102)))

to draw a stacked barchart of the precentage contribution of each type of dioxin
congener. Now, however I get the following error.

Error in grid.Call.graphics("L_rect", x$x, x$y, x$width, x$height,
valid.just(x$just)) : 
	invalid line type

The graph that actually results on my trellis device has axes and for the first
sample it manages to 7 of the 17 stacked bars.

As a work-around I have used (I used reps of 50 as another graph has 46
congeners):

my.tpar <- trellis.par.get("superpose.fill")
my.tpar$alpha <- rep(1,50)
my.tpar$border <- rep("black", 50)
my.tpar$lty <- rep(1, 50)
my.tpar$lwd <- rep(1, 50)
trellis.par.set("superpose.fill", my.tpar)

The barchart conequently works.



More information about the R-devel mailing list