Dear R users,

I am trying to use the following code to make a barchar plot. The bars in
the plot turn out to be a little narrow. Is there any way to modify the
width of the bars? Thank you!

library(lattice)
scores = gl(2, 5, label=c('Sensitivity', 'PPV'), length = 100)
sequences = gl(5, 1, label=c('Lemna minor', 'Dugesia japonica A',
'Gymnosporangium sabinae', 'Hymeniacidon sanguinea', 'Streptomyces
griseus'), length = 100)
levels = gl(10, 10, label = c('Cycle 1', 'Cycle 2', 'Cycle 3', 'Cycle 4',
'Order 1', 'Order 2', 'Order 3', 'MaxPairs = 20', 'MaxPairs = Average
Length', 'MaxPairs = 500'))
factors = c(rep('Cycles', 40), rep('Order', 30), rep('MaxPairs', 30))
values = rnorm(100) # this is toy data
a = data.frame(values, scores, sequences, levels, factors)
bc.factors =
  barchart(values ~ sequences | scores * factors , data = a,
           groups = levels,
           layout = c(2,3),
           between = list(y=0.5),
           clip = list(strip = 'off'),
           par.strip.text = list(cex=0.7),
           par.settings = list(fontsize=list(text=8)),
           auto.key = list(rectangles = TRUE, space = 'right', columns = 1),
           draw.key = TRUE,
           scales = list(x = list(rot = 45)))

-- 
Best,
Zhenjiang

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to