title: Put stars on ggplot barplots and boxplots - to indicate the level of significance (p-value)
body: <p>It's common to put stars on barplots or boxplots to show the level of significance (p-value) of one or between two groups, below are several examples: </p>
  
  <p><img src="https://i.stack.imgur.com/HlVYs.png" alt="enter image description here"><img src="https://i.stack.imgur.com/WEVho.png" alt="enter image description here"><img src="https://i.stack.imgur.com/IAM1z.png" alt="enter image description here"></p>
  
  <p>The number of stars are defined by p-value, for example one can put 3 stars for p-value &lt; 0.001, two stars for p-value &lt; 0.01, and so on (although this changes from one article to the other).</p>
  
  <p>And my questions: How to generate similar charts? The methods that automatically put stars based on significance level are more than welcome.</p>