title: Why does my data visual in ggplot2 display 4 significant figures when I specify 3?
body: <p>I'm trying to create a bar chart the displays the unemployment rate for people who majored in the social sciences for 4 different age groups. In my visual, I want to display the unemployment rate on each bar, but I'm having trouble getting the labels on my bars to display 3 significant figures.</p>
  <p>Here is my code:</p>
  <pre><code>social_vs &lt;- social_ur %&gt;%
    ggplot(aes(
      x = age_group,
      y = unemployment_rate_avg,
      fill = age_group
    )) +
    geom_bar(stat = &quot;identity&quot;) +
    geom_text(aes(label = scales::percent(signif(unemployment_rate_avg, digits = 3)), vjust = 2.0))
  
  social_vs1 &lt;- social_vs +
    scale_y_continuous(name = &quot;Unemployment Rate&quot;, labels = scales::percent, n.breaks = 4) +
    scale_x_discrete(name = &quot;Age Group&quot;, labels = c(
      &quot;25 to 34&quot;,
      &quot;35 to 44&quot;,
      &quot;45 to 54&quot;,
      &quot;55 to 64&quot;)) +
    scale_fill_brewer(palette = &quot;Set2&quot;) +
    theme_grey() +
    theme(legend.position = &quot;none&quot;) +
    labs(title = &quot;Social: unemployment rate by age group&quot;)
  
  social_vs1
  </code></pre>
  <p>As you can see, I specify</p>
  <pre><code>signif(unemployment_rate_avg, digits = 3)
  </code></pre>
  <p>yet my visual still displays 4 significant figures.</p>
  <p>I've included a png of the visual created by running the above code.</p>
  <p><a href="https://i.stack.imgur.com/VVpRX.png" rel="nofollow noreferrer">Social Science Unemployment Rates</a></p>