# My boxplots are completely narrowed

**URL:** <https://community.plotly.com/t/my-boxplots-are-completely-narrowed/57370>\
**Category:** 📊 Plotly Python\
**Created:** [October 8, 2021, 12:54pm UTC](https://community.plotly.com/t/my-boxplots-are-completely-narrowed/57370 "2021-10-08T12:54:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ltalignani](https://avatars.discourse-cdn.com/v4/letter/l/74df32/32.png) [@ltalignani](https://community.plotly.com/u/ltalignani)\
**Post date:** [October 8, 2021, 12:54pm UTC](https://community.plotly.com/t/my-boxplots-are-completely-narrowed/57370/1 "2021-10-08T12:54:59Z")

</div>

Hello everybody,

This is my first post on the plotly forum!

I decided to contact you because I am working on a graph with 16 groups of 2 boxplots. Unfortunately, my boxplots appear completely narrowed in width, as you can see

 ![newplot](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/0/5/056623aecfbe6154e20cd85657ad25fe0c37ead9.png)

I tried to use update\_layout to set the boxgap and boxgroupgap, but this has not changed anything.

Here is my code below:

```auto
colors = ['#d52221', '#f44f39', '#fc8161', '#fcaf93', 
          '#fedbcc', '#feb23f', '#f4811d', '#2b7bba', 
          '#539ecd', '#89bedc', '#bad6eb', '#2c944c', 
          '#8ed08b', '#d1d2e7', '#705eaa', '#adadad']

fig = go.Figure()

# Nora's data
for i, col in enumerate(pi_percent):
    fig.add_trace(go.Box(y=pi_percent[col], 
                         name = col,
                         marker=dict(color=colors[i])))
    
# Mara's data
for i, col in enumerate(pi_percent_mara):
    fig.add_trace(go.Box(y=pi_percent_mara[col], 
                         name = col,
                         marker=dict(color=colors[i])))
    
    
fig.update_layout(
                boxmode='group',
                boxgap=0,
                boxgroupgap=0,
                autosize=False,
                width=1500,
                height=600,
                margin=dict(
                l=50,
                r=50,
                b=100,
                t=100,
                pad=4),
            title={'text':"Nucleotide diversity",
                    'y':0.9,
                    'x':0.5,        
                    'xanchor': 'center',
                    'yanchor': 'top'},
            xaxis_title="Population",
            yaxis_title="Pi (%)",
            font=dict(
                    family="Arial, monospace",
                    size=12,
                    color="black"),
            showlegend=False,
            template="plotly_white") #"plotly", "plotly_white", "plotly_dark", "ggplot2", "seaborn", "simple_white", "none"

# A data every 0.5% for y axis
fig.update_yaxes(tick0=0, dtick=0.5)

fig.update_xaxes(tickangle=-45,
                 ticklabelposition='outside bottom') #['outside', 'inside', 'outside top', 'inside top', 'outside left', 'inside left', 'outside right', 'inside right', 'outside bottom', 'inside bottom']

fig.show()

```

I just want to expand my boxplots.  
I thank you in advance for the help you will give me.

Regards
