title: Variable distances between bars on ggplot bar plot
body: <p>I have the following bar plot created using R ggplot. How do I dynamically update the distances between the bars on the plot using the 'distance' column of the same data frame.</p>
  <pre><code>library(tidyverse)
  data.frame(name = c(&quot;A&quot;,&quot;B&quot;,&quot;C&quot;,&quot;D&quot;,&quot;E&quot;),
             value = c(34,45,23,45,75),
             distance = c(3,4,1,2,5)) %&gt;%
    ggplot(aes(x = name, y = value)) +
    geom_col()
  </code></pre>
  <p><a href="https://i.stack.imgur.com/W6Q58.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W6Q58.png" alt="enter image description here" /></a></p>