Adjust the distance between x labels and the chart using ggplot2
<p>I am trying to cut the distance between x axis labels and the graph, so that it would be more clearly visible which bar responds to what lable. This is the code and the graph:</p>

<pre><code>graph196 &lt;- ggplot(serazene196a, aes(x = okres2, y = (NEPO_ANO_NE.mean/100), ordered=TRUE)) +
geom_bar(stat = "Identity", colour="white") 

graph196 + theme_stata() + theme(axis.text.x = element_text(angle = 90, hjust = 1, size = 10, vjust=0.5),
                             axis.text.y = element_text(angle = 0),
                             axis.title.x = element_blank(), axis.title.y = element_blank(),
             axis.text.y = element_text(size = 10), axis.ticks.x = element_blank(),
             axis.ticks.y = element_blank(),
             panel.border = element_blank(),
             plot.background = element_rect(fill = 'white')) +
scale_y_continuous(labels=percent) 
</code></pre>

<p>It looks like that: [1]: <a href="https://i.stack.imgur.com/bBjdn.jpg" rel="noreferrer">http://i.stack.imgur.com/bBjdn.jpg</a></p>

<p>If I increase hjust to 1.2, the labels appear close enough to the graph, but at the same time they are not aligned, so the graph does not look good at all:  [1]: <a href="https://i.stack.imgur.com/C7Boc.jpg" rel="noreferrer">http://i.stack.imgur.com/C7Boc.jpg</a>. </p>

<p>Is there an option of how to align the labels with increased hjust or otherwise bring the entire labels closer to the graph?</p>

<p>The problem is similar to this one: <a href="https://stackoverflow.com/questions/36782852/adjust-distance-between-x-axis-and-text-in-r-plot">Adjust distance between x-axis and text in R plot</a>, except the fact that I am using ggplot2.</p>