Almost there!
So my previous data example was just a small subset of my true data. I have
all the months from 2007-2009 in order. So when I create the barplot
following your script, it bins all 12 months for each year -- a stacked
barplot with 3 bars (2007,2008,2009), which I don't want. I want e
Hi:
Is this what you were expecting? Calling your data set below 'data',
# order months chronologically
data$month <- ordered(data$month, levels = c('SEP09', 'OCT09', 'DEC09'))
# Plot it...
p <- ggplot(data, aes(x = month, fill = type))
p + geom_bar(aes(weight = volume), position = 'stack')
HTH,
2 matches
Mail list logo