# How to change barmodes between subplots

**URL:** <https://community.plotly.com/t/how-to-change-barmodes-between-subplots/39683>\
**Category:** Dash Python\
**Created:** [May 18, 2020, 6:32pm UTC](https://community.plotly.com/t/how-to-change-barmodes-between-subplots/39683 "2020-05-18T18:32:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juanouo](https://avatars.discourse-cdn.com/v4/letter/j/49beb7/32.png) [@Juanouo](https://community.plotly.com/u/Juanouo)\
**Post date:** [May 18, 2020, 6:32pm UTC](https://community.plotly.com/t/how-to-change-barmodes-between-subplots/39683/1 "2020-05-18T18:32:54Z")

</div>

Hey all,  
I had what I thought was a very simple problem but it has sent me through a rabbit hole and I guess I’m missing something. I was trying to make a very simple 2x1 plot. The first plot was a stacked bar plot, and the second one is a regular bar plot. But, because the `barmode` argument is attached to figure’s layout, I can’t find a way to change a specific subplot’s barmode.

My code goes something like this:

```auto
    trace1 = go.Bar(x=dfv['date'], y=dfv['used'],
                         marker_color='red')
    trace2 = go.Bar(x=dfv.fecha, y=dfv.disponible
                     marker_color='green')
    fig.append_trace(trace1, 1, 1)
    fig.append_trace(trace2, 1, 1)
    fig.update_layout(barmode='stack')
    trace3 = go.Bar(x=dfv.date, y=dfv.cost, name='Cost')
    trace4 = go.Bar(x=dfv['date'], y=dfv['price'], name='Price')
    fig.append_trace(trace3, 2, 1)
    fig.append_trace(trace4, 2, 1)
    

```

So, how can I make traces 1 and 2 stacked and traces 3 and 4 regular barplots? I tried things like`px.bar()`, that has a `barmode` argument, but it has weird interactions with `add_trace()` (or I’m also missing something, so that kinda worked, but the label was lost and I had to update several properties with `udpate_traces` . I also tried `cufflinks` ’ `iplot` but `barmode` was ignored by Dash.  
Thanks
