r - Control spacing between bars in a stacked barplot -
When I plot a stacked barplot in R, then the X axis values are used with equal intervals of bars As label, I should put the bars closer or further on the basis of X axis values. Can someone help me get this plot using R?
Edit: Bars just labeled according to line names goes. But I want the bars of 400,500,600 to be closer to each other, empty space to represent any block for 700,800 9 00 , then bar for 1000, then empty space 1500, Bars of 1500, 1600, 1700, , etc. Given that a
# data.frame newtest ABCD 100 0.2 0.3 0.1 0.4 400 0.3 0.5 0.1 0.1 500 0.1 0.3 0.4 0.2 600 0.4 0.2 0.2 0.2 1000 0.1 0.5 0.1 0.3 1500 0.3 0.2 0.2 0.3 1600 0.4 0.1 0.3 0.2 1700 0.1 0.1 0.7 0.1 2500 0.3 0.2 0.1 0.4 1 plot barplot (T. (matrix (newtest)), Col = c ("cyan", " Legblue "," yellow "," green "), legend = colnames (newtest), cex.main = 0.5, cex.axis = 0.5, cex.lab = 0.5, lwd = 0.02) < P> Here's the plot:
barplot represents a specific variable in the x code Does not, I do not think there is no solution except to present additional dummy comments in your data:
additional columns & lt; - Setdiff (seq (100,2500, by = 100), RoundMax (Newtext) extra cells (LTE) - Repeat (Length (extra (supersculine), Representative (0,4) colnames (extra cells) & lt; - ExtraNonites DT <- cbind (t (as.matrix (newtest)), ("cyan", "light blue", "yellow", "green"), legend = aliases (newtest), cex.main = 0.5, cex .axis = 0.5, cex.lab = 0.5, lwd = 0.02)
Comments
Post a Comment