 <p>Finally, I managed to make it work... so thank you to those who gave me comments:</p> <pre><code>df1$diff_order &lt;- reorder(df1$country.name, df1$diff) #Set order of countries by diff, and then set this to be plot a &lt;- ggplot(df1, aes((x=diff_order), y=diff,fill=as.factor(level))) + geom_bar(stat="identity") + xlab("Country") + theme_classic() + coord_flip() + scale_fill_manual(values=c("#009E73", "#0072B2"),name="NUTS level") + ggtitle("All") + theme(plot.title = element_text(hjust = 0)) + theme(axis.title.x = element_blank()) + theme(axis.text=element_text(size=9), axis.title=element_text(size=10,face="bold")) a </code></pre> <p><a href="https://i.stack.imgur.com/oUrQQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oUrQQ.png" alt="enter image description here"></a></p>