'ggplot2: Different width of bars

My dataset is at the link dataset in txt

ggplot(vojvodina2016, aes(x=uz, y=per1000, fill=grupa)) +
  geom_bar(stat='identity', position='dodge') + 
  scale_x_continuous(breaks = c(0,5,15, 25,35,45,55,65,75,85),
                     label = c("0", "5", "15","25", "35", "45","55", "65", "75","85+")) + 
  theme_bw()

graph

However, it seems that bars are different width.



Solution 1:[1]

I ran your code and obtained a graph with equal width for all bars. There is no line in your code suggesting it should be otherwise. Try printing it out with a different size/resolution.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dharman