plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

Styling the appearance of bar charts

Open rohitsathish opened this issue 4 years ago • 2 comments

Is it possible to change the appearance of bar charts so they look more like the images below? Is it possible to change the shape of the bar and create a partial overlap between different values like in image 1?

image image

rohitsathish avatar Sep 20 '22 09:09 rohitsathish

Hi @rohitsathish. No, there is currently no way to change the shape or overlap of the bars in a bar plot. Probably the closest you could get to something like the examples you provided would be to use a Filled area plot, though it definitely wouldn't be as straightforward:

import plotly.graph_objects as go

fig = go.Figure()
fig.add_trace(go.Scatter(x=[0,0.5,1,1.5,2], y=[0,1,2,1,0],
                    fill='toself', mode='none'))

fig.add_trace(go.Scatter(x=[1,1.5,2,2.5,3], y=[0,1,2,1,0],
                    fill='toself', mode='none'))

fig.update_layout(
    xaxis_range = [0,5.2],
    yaxis_range = [0,3])

fig.show()

image

Those examples look like they were made in Excel or some other chart maker designed specifically to create stylized charts

AaronStiff avatar Mar 11 '23 23:03 AaronStiff

Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Alternatively, if it's a request for tech support, please post in our community forum. Thank you - @gvwilson

gvwilson avatar Jul 05 '24 13:07 gvwilson