I want to draw a barplot with in axis x the number of months and in axis y the value of a variable. The variable can be null for some months. How can I coerce the axis x to always show the 12 months?
With V a data frame like:
month variable
1 125
2 45
3 158
4 15
5 58
6 78
7 89
9 15
10 85
11 799
12 55
Here in August (month 8) the variable is 0.
bp <- barplot(V[,2], axes = FALSE)
axis(1, at = bp, labels=c("jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"))
Thanks