Thanks to Bill Dunlap and Bin Wang
Michel Piot
> I want to draw a trellisPlot with plot.type="stackbar".
> Furthermore I would like to change the color of the stackbars.
> Unfortunately when I try to solve the problem with
> trellis.device()
> color <- trellis.par.get("stackbar")
> color$fill.col[1] <- 3
> trellis.par.set("stackbar", color)
>
> I get the error message:
> Problem in trellis.par.set("stackbar", color): different length in
> each components Use traceback() to see the call stack
It looks like this already has been fixed for the version
of Splus, but you can work around the problem by doing
color$width <- rep(color$width, length(color$angle))
before passing your 'color' to trellis.par.set().
|