# Change width of a particular stack in Makie bar plot

**URL:** <https://discourse.julialang.org/t/change-width-of-a-particular-stack-in-makie-bar-plot/85269>\
**Category:** Visualization\
**Tags:** question, plotting, visualization, makie\
**Created:** [August 3, 2022, 10:30pm UTC](https://discourse.julialang.org/t/change-width-of-a-particular-stack-in-makie-bar-plot/85269 "2022-08-03T22:30:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![math\_opt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/math_opt/32/25317_2.png) [@math\_opt](https://discourse.julialang.org/u/math_opt)\
**Post date:** [August 3, 2022, 10:30pm UTC](https://discourse.julialang.org/t/change-width-of-a-particular-stack-in-makie-bar-plot/85269/1 "2022-08-03T22:30:20Z")

</div>

I need to have some customization in my bar plots, and was wondering if someone could help me achieve the following two things:

1. How to specify different widths to different stacks in the bar plot? For example, in the plot below, I want the width as follows `left = 0.7`, `middle = 0.9`, `right = 1.3`, `extra = 0.5`.
2. How to write some numbers over each stack. For example, how to write say `2.0` over `left` stack, `3.0` over `right` stack, and so on?  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/e/1eaabc0d9bf11853997b587f4ece60ce90d3d17a.png)

Code:

```julia
using CairoMakie
tbl = (
    x = [1, 2, 3, 4, 1, 2, 3, 4],
    height = [10,15,20,25,12,17,23,30],
    grp = [1,1,1,1,2,2,2,2],
)
barplot(tbl.x, tbl.height; 
dodge = tbl.grp, 
color = 1:8,
axis = (xticks = (1:4, ["left", "middle", "right", "extra"]),
                title = "Dodged bars"))

```

Thanks!
