Error Bar Chart

Language Learning Methods

Comparison of language learning approaches showing proficiency over time.

Output
Language Learning Methods
Python
import matplotlib.pyplot as plt
import numpy as np

np.random.seed(42)

months = ['Month 1', 'Month 3', 'Month 6', 'Month 9', 'Month 12']
duolingo = np.array([15, 35, 52, 65, 72])
immersion = np.array([10, 42, 68, 82, 90])
classroom = np.array([12, 28, 45, 58, 68])
duo_err = np.array([5, 8, 10, 10, 8])
imm_err = np.array([4, 10, 12, 10, 6])
class_err = np.array([4, 6, 8, 8, 7])

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

x = np.arange(len(months))

ax.errorbar(x, duolingo, yerr=duo_err, fmt='o-', color='#6CF527',
            ecolor='#6CF527', elinewidth=2, capsize=6, markersize=12,
            markeredgecolor='#1f2937', linewidth=3, label='App-Based (Duolingo)', alpha=0.9)

ax.errorbar(x, immersion, yerr=imm_err, fmt='s-', color='#F5276C',
            ecolor='#F5276C', elinewidth=2, capsize=6, markersize=11,
            markeredgecolor='#1f2937', linewidth=3, label='Full Immersion', alpha=0.9)

ax.errorbar(x, classroom, yerr=class_err, fmt='^-', color='#27D3F5',
            ecolor='#27D3F5', elinewidth=2, capsize=6, markersize=11,
            markeredgecolor='#1f2937', linewidth=3, label='Traditional Classroom', alpha=0.9)

ax.axhline(y=80, color='#F5B027', linestyle='--', linewidth=2, 
           label='Conversational Fluency', alpha=0.8)

ax.set_xlabel('Study Duration', fontsize=12, color='#374151', fontweight='600')
ax.set_ylabel('Proficiency Score', fontsize=12, color='#374151', fontweight='600')
ax.set_title('Language Learning Methods Comparison', fontsize=15, 
             color='#1f2937', fontweight='bold', pad=20)

ax.set_xticks(x)
ax.set_xticklabels(months, fontsize=11)
ax.legend(facecolor='#ffffff', edgecolor='#e5e7eb', fontsize=10, loc='lower right')
ax.tick_params(colors='#6b7280', labelsize=10)
ax.set_ylim(0, 105)
ax.grid(True, alpha=0.4, color='#e5e7eb')
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.spines['left'].set_color('#d1d5db')
ax.spines['bottom'].set_color('#d1d5db')

plt.tight_layout()
plt.show()
Library

Matplotlib

Category

Statistical

Did this help you?

Support PyLucid to keep it free & growing

Support