# Untitled

unknown
plain_text
a month ago
1.9 kB
0
Indexable
Never
```# Creating a flowchart for the Work Breakdown Structure (WBS) of a backyard swimming pool project

import matplotlib.pyplot as plt

# Initialize the figure
fig, ax = plt.subplots(figsize=(10, 8))

# Turn off the axis
ax.axis('off')

# Define a function to create a box in the flowchart
def create_box(x, y, width, height, text, ax):
rect = plt.Rectangle((x-width/2, y-height/2), width, height, fill=True, edgecolor='black', facecolor='skyblue')
ax.text(x, y, text, ha='center', va='center', fontsize=10)

# Define a function to connect boxes in the flowchart
def connect_boxes(x1, y1, x2, y2, ax, connection_type):
if connection_type == 'vertical':
elif connection_type == 'horizontal':

# Coordinates for boxes
box_positions = {
'Preparation': (2, 6),
'Site Preparation': (2, 5),
'Excavation': (2, 4),
'Framework Installation': (2, 3),
'Plumbing and Electrical Setup': (4, 5),
'Pool Structure': (4, 4),
'Finishing Touches': (4, 3),
'Equipment Setup': (6, 5),
'Landscaping and Safety Measures': (6, 4),
'Inspection and Completion': (6, 3)
}

# Create the boxes
for text, (x, y) in box_positions.items():
create_box(x, y, 1.8, 0.8, text, ax)

# Connect the boxes
connect_boxes(2, 6, 2, 5, ax, 'vertical')
connect_boxes(2, 5, 2, 4, ax, 'vertical')
connect_boxes(2, 4, 2, 3, ax, 'vertical')
connect_boxes(2, 5, 4, 5, ax, 'horizontal')
connect_boxes(4, 5, 4, 4, ax, 'vertical')
connect_boxes(4, 4, 4, 3, ax, 'vertical')
connect_boxes(4, 5, 6, 5, ax, 'horizontal')
connect_boxes(6, 5, 6, 4, ax, 'vertical')
connect_boxes(6, 4, 6, 3, ax, 'vertical')

# Show the flowchart
plt.show()
```