title: How to use add_annotations in a bar chart
body: <p>I need help to add some notes on a chart bar, built with <code>plotly</code>.</p>
  
  <p>I have the following data frame "<em>s</em>":</p>
  
  <pre><code>s_0 &lt;- c("NH", "OR", "NE", "PA", "NJ", "MA", "IL", "CA", "WI", "OH", "WV")
  s_1 &lt;- c(0.66719, 0.62480, 0.62797, 0.55121, 0.25582, 0.63407, 0.57009, 0.29712, 0.19979, 0.08913, -0.16944)
  s &lt;- data.frame(s_0, s_1)
  </code></pre>
  
  <p>I use <code>plot_ly()</code> to produce the following bar chart:</p>
  
  <pre><code>s_plot &lt;- plot_ly(x = ~s_1, y = reorder(s_0, s_1),
  type = 'bar',
  orientation = 'h',
  marker = list(color = 'rgba(50, 50, 100, 1)',
  line = list(color = 'rgba(128, 0, 128)')))
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/MQ1lt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MQ1lt.jpg" alt="bar chart"></a></p>
  
  <p>I want to add the values of "s_1" in the graph at the end of the bars, like in the image below but for every bar.</p>
  
  <p><a href="https://i.stack.imgur.com/KewyB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KewyB.png" alt="enter image description here"></a></p>
  
  <p>I suppose I had to use <code>add_annotations()</code>, but I don't know how to do it.</p>
  
  <p>I gently ask for the code, I know it should be very simple.    </p>