Area Chart

Plant Growth Tracking

Seedling height progression with growth rate bands

Output
Plant Growth Tracking
Python
import matplotlib.pyplot as plt
import numpy as np

np.random.seed(42)
days = np.arange(1, 61)  # 60 days

# Logistic growth curve
L = 45  # max height
k = 0.12  # growth rate
x0 = 25  # midpoint
height = L / (1 + np.exp(-k * (days - x0))) + np.random.normal(0, 1, len(days))

# Growth rate bands
fast_growth = height * 1.15
slow_growth = height * 0.85

fig, ax = plt.subplots(figsize=(10, 6), facecolor='#ffffff')
ax.set_facecolor('#ffffff')

ax.fill_between(days, slow_growth, fast_growth, alpha=0.2, color='#6CF527', label='Growth variance')
ax.fill_between(days, 0, height, alpha=0.4, color='#6CF527')
ax.plot(days, height, color='#6CF527', linewidth=2.5, label='Measured height')

# Growth phases
ax.axvspan(1, 15, alpha=0.1, color='#F5B027')
ax.axvspan(15, 40, alpha=0.1, color='#27D3F5')
ax.axvspan(40, 60, alpha=0.1, color='#4927F5')

ax.text(8, 42, 'Seedling', color='#F5B027', fontsize=9, ha='center')
ax.text(27.5, 42, 'Vegetative', color='#27D3F5', fontsize=9, ha='center')
ax.text(50, 42, 'Mature', color='#4927F5', fontsize=9, ha='center')

ax.set_xlabel('Days', color='#1f2937', fontsize=11)
ax.set_ylabel('Height (cm)', color='#1f2937', fontsize=11)
ax.set_title('Tomato Seedling Growth Curve', color='#1f2937', fontsize=14, fontweight='bold', pad=15)
ax.tick_params(colors='#374151', labelsize=9)
for spine in ax.spines.values():
    spine.set_color('#e5e7eb')
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.set_xlim(1, 60)
ax.set_ylim(0, 50)
ax.legend(facecolor='#ffffff', edgecolor='#e5e7eb', labelcolor='#1f2937')

plt.tight_layout()
plt.show()
Library

Matplotlib

Category

Basic Charts

Did this help you?

Support PyLucid to keep it free & growing

Support