Reordering levels inside barplots or heatmaps
positions <- c("less than 10%","10-30%","30-50%","50-70%","70%-100%") scale_x_discrete(limits = positions)