# Plots: bars side by side

**URL:** <https://discourse.julialang.org/t/plots-bars-side-by-side/6655>\
**Category:** Visualization\
**Tags:** question, plotting\
**Created:** [October 24, 2017, 1:36pm UTC](https://discourse.julialang.org/t/plots-bars-side-by-side/6655 "2017-10-24T13:36:19Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![Parazetamol](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/parazetamol/32/52125_2.png) [@Parazetamol](https://discourse.julialang.org/u/Parazetamol)\
**Post date:** [September 19, 2020, 8:10pm UTC](https://discourse.julialang.org/t/plots-bars-side-by-side/6655/12 "2020-09-19T20:10:27Z")

</div>

Hi there, I desperately try to label the individual bars, as in the original example 20, 25, … etc. I tried adding series\_annotations like this

```julia
using StatsPlots

men = [20, 35, 30, 35, 27]
women = [25, 32, 34, 20, 25]
std_men = [2, 3, 4, 1, 2]
std_women = [3, 5, 2, 3, 3]

groupedbar(
  ["G1", "G2", "G3", "G4", "G5"],
  [men women],
  yerr = [std_men std_women],
  series_annotations = [string.(men), string.(women)]
)

```

results in a plot with misaligned annotations:  
 ![Screenshot from 2020-09-19 22-17-31](https://global.discourse-cdn.com/julialang/original/3X/6/2/62eef7ed3542b7f7e9207fe1b06d607fd47df600.png)  
A second run results in a plot with the top cut off and an error message  
“GKS: Rectangle definition is invalid in routine SET\_VIEWPORT” .  
Please help!

---

_[View the full topic](https://discourse.julialang.org/t/plots-bars-side-by-side/6655)._
