1import matplotlib.pyplot as plt
2import seaborn as sns
3import numpy as np
4
5# Set global theme
6sns.set_theme(style='whitegrid')
7fig, axes = plt.subplots(2, 2, figsize=(14, 10), dpi=150)
8fig.suptitle('MSK Institute - Executive Sales & Profitability Dashboard (FY 2026)', fontsize=16, fontweight='bold', y=0.98)
9
10# Panel 1: Monthly Trend
11months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
12rev = [45, 52, 60, 68, 85, 95]
13axes[0, 0].plot(months, rev, marker='o', color='#2563eb', linewidth=2.5, label='Actual')
14axes[0, 0].axhline(70, color='#ef4444', linestyle='--', label='Monthly Target (70L)')
15axes[0, 0].set_title('Monthly Revenue Trajectory (Lakhs INR)')
16axes[0, 0].legend()
17
18# Panel 2: Product Category Share
19categories = ['Data Analytics', 'Full Stack Web', 'Python Backend', 'Cloud DevOps']
20shares = [40, 25, 20, 15]
21axes[0, 1].bar(categories, shares, color=['#3b82f6', '#10b981', '#f59e0b', '#8b5cf6'])
22axes[0, 1].set_title('Revenue Share by Tech Track (%)')
23axes[0, 1].set_xticklabels(categories, rotation=15, ha='right')
24
25# Panel 3: Discount vs Profitability
26discounts = np.random.uniform(5, 40, 100)
27profits = 100 - (discounts * 2.2) + np.random.normal(0, 10, 100)
28axes[1, 0].scatter(discounts, profits, color='#059669', alpha=0.7)
29axes[1, 0].set_title('Discount % vs Operating Margin Impact')
30axes[1, 0].set_xlabel('Discount Offered (%)')
31axes[1, 0].set_ylabel('Profit Margin (%)')
32
33# Panel 4: Regional Performance
34regions = ['Delhi NCR', 'Western UP', 'Mumbai Metro', 'Bengaluru Hub']
35performance = [320, 280, 210, 190]
36axes[1, 1].barh(regions, performance, color='#0284c7')
37axes[1, 1].invert_yaxis()
38axes[1, 1].set_title('Gross Enrollments by Regional Hub')
39
40plt.tight_layout()
41plt.show()