Eric Stralsund
Eric Stralsund

Reputation: 559

Step drawstyle plotly dash

I created some cool graphs with matplotlib and “drawstyle steps” time on x, categorical data on y and steps betwenn these points like picture below. Is this possible in plotly? I have only found gannt, but thats not what I need, in a kind of a waterfall graph would be nice but I have same category multiple on timeline (x), must not be exact the same but something which I can see how long was the time (in my case timedelta) from one datadot to another

enter image description here

Upvotes: 2

Views: 2702

Answers (1)

nicolaskruchten
nicolaskruchten

Reputation: 27370

You can use line_shape (set to vh or hv) and line_dash like this.

import plotly.express as px

fig = px.line(x=[0,1,2,3,4,5], y=[0,1,0,2,0,1])
fig.update_traces(mode="markers+lines", line_shape="vh", line_dash="dash")
fig.show()

enter image description here

Upvotes: 6

Related Questions