79803764

Date: 2025-10-29 12:11:33
Score: 7
Natty:
Report link

here are some clarifications for this request:

Step1: Data

Let's assume you have a factory that produces 3 products (A,B,C). Each product goes through 3 production steps (Stamping, Assembly, Test). You measure for each product the cycle time per production step in minutes. The data looks like this:

products=['Product A', 'Product A','Product A','Product A','Product A','Product B','Product B','Product B','Product B','Product B', 'Product C','Product C','Product C','Product C','Product C']

production_step=['Start', 'Stamping', 'Assembly','Test','End','Start', 'Stamping', 'Assembly','Test','End','Start', 'Stamping', 'Assembly','Test','End','Start', 'Stamping', 'Assembly','Test','End','Start', 'Stamping', 'Assembly','Test','End']

cycle_time=[0,150,100,170,0,0,130,80,100,0,0,100,90,120,0]

data = list(zip(products, production_step, cycle_time))

df=pd.DataFrame(data, columns=['Product', 'Production Step', 'Cycle Time (min)'])

Note: I artificially added a "Start" and "End" time of 0 so the area charts in the next Step 2 resemble density plots.

Step 2: Visualization

fig=go.Figure()

fig.add_trace(go.Scatter(x=df["Production Step"], y=df["Cycle Time (min)"], line_shape='spline', fill='tozeroy'))

fig.show()

enter image description here Note:

Step3: Make it look like a ridge plot

This is where I'm stuck. What is missing is a vertical offset and the Product names appearing along the y-axis.

Do you have any ideas how to make this happen?

Reasons:
  • Blacklisted phrase (1): any ideas
  • RegEx Blacklisted phrase (1.5): I'm stuck
  • RegEx Blacklisted phrase (2.5): Do you have any
  • Long answer (-1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: MaximJ