================================================================================
  Question 45: Multi-Panel Visualization Dashboard (2x2 Subplots)
================================================================================

FULL QUESTION:
Task:
Write a Python program to create multiple plots in a unified dashboard:
1. Line Chart: Continuous mathematical function (e.g. Sine wave).
2. Bar Chart: Categorical comparison across discrete groups.
3. Scatter Plot: Feature correlation with color-mapping scale.
4. Pie Chart: Proportional distribution of categories.

SHORT QUESTION:
Multi-panel data visualization dashboard displaying line, bar, scatter, and pie charts in a 2x2 subplot layout.

================================================================================
README & SETUP INSTRUCTIONS:
================================================================================
# Question 45: Multi-Panel Visualization Dashboard (2x2 Subplots)

- Prerequisites: Python 3.x, Matplotlib, NumPy (pip install matplotlib numpy).
- Setup: None.
- How to Run: python question_45.py
- Expected Behavior: Renders a 2x2 multi-panel visualization window showing four distinct chart types with styled aesthetics.

================================================================================
SOURCE CODE FILES:
================================================================================

1. question_45.py
--------------------------------------------------------------------------------
import matplotlib.pyplot as plt
import numpy as np

np.random.seed(42)

x = np.linspace(0, 10, 100)
y_line = np.sin(x)

categories = ['Group A', 'Group B', 'Group C', 'Group D']
bar_values = [23, 45, 12, 38]

x_scatter = np.random.rand(50) * 10
y_scatter = np.random.rand(50) * 10 + x_scatter

pie_sizes = [35, 25, 20, 20]
pie_labels = ['Category 1', 'Category 2', 'Category 3', 'Category 4']

fig, axes = plt.subplots(2, 2, figsize=(12, 8))
fig.suptitle('Multi-Panel Data Visualization Dashboard', fontsize=16, fontweight='bold')

axes[0, 0].plot(x, y_line, color='#1f77b4', linewidth=2, label='Sine Wave')
axes[0, 0].set_title('1. Line Chart (Continuous Function)')
axes[0, 0].set_xlabel('X Axis')
axes[0, 0].set_ylabel('Y Axis')
axes[0, 0].grid(True, linestyle='--', alpha=0.6)
axes[0, 0].legend()

axes[0, 1].bar(categories, bar_values, color=['#2ca02c', '#ff7f0e', '#d62728', '#9467bd'])
axes[0, 1].set_title('2. Bar Chart (Categorical Data)')
axes[0, 1].set_xlabel('Categories')
axes[0, 1].set_ylabel('Values')
axes[0, 1].grid(axis='y', linestyle='--', alpha=0.6)

scatter = axes[1, 0].scatter(x_scatter, y_scatter, c=y_scatter, cmap='viridis', alpha=0.8, edgecolors='k')
axes[1, 0].set_title('3. Scatter Plot (Correlation)')
axes[1, 0].set_xlabel('Feature X')
axes[1, 0].set_ylabel('Feature Y')
axes[1, 0].grid(True, linestyle='--', alpha=0.6)
fig.colorbar(scatter, ax=axes[1, 0], label='Scale Value')

axes[1, 1].pie(pie_sizes, labels=pie_labels, autopct='%1.1f%%', startangle=140, colors=['#4c72b0', '#55a868', '#c44e52', '#8172b0'])
axes[1, 1].set_title('4. Pie Chart (Proportions)')

plt.tight_layout(rect=[0, 0, 1, 0.95])
plt.show()
--------------------------------------------------------------------------------
