Remove white line at bottom of go.Bar? (not x-axis)

Trying to make a minimalistic, everything-removed-and-stripped-off bar chart:

import plotly.graph_objects as go

fig = go.Figure()

fig.add_trace(
    go.Bar(
        x = df['date'],
        y = df['volume'],
        marker = dict(color = 'rgba(255,255,255,0.1)', line = dict(width = 0))
    ),
)

fig.update_layout(
    height = 700,
    width = 900,
    plot_bgcolor='rgba(0,0,0,0)',
    paper_bgcolor='rgba(0, 7, 46, 1)',
)

fig.update_xaxes(
    showticklabels=False,
    zeroline = False,
    showgrid = False
)


fig.update_yaxes(
    showticklabels=False,
    gridcolor = 'rgba(0,0,0,0)',
)

fig.show()

zeroline = False or showline = False are not working, what exactly is this white line?

Thanks in advance!

Note: I have tried testing with showline=True, linewidth=1, linecolor='white' and that draws a separate line as x-axis slightly below it, hence this is not the x-axis and is a different line in itself.

@yasserius

Finally figured it out :female_detective:

Just add zerolinecolor = 'rgba(0,0,0,0)' to your fig.update_yaxes()

fig.update_yaxes(
    showticklabels=False,
    showgrid = False,
    zerolinecolor = 'rgba(0,0,0,0)'
)
1 Like

Damn, thanks so much @atharvakatre, this makes no sense but it solved it! Kudos!

1 Like