================================================================================
  Question 46: Grouped Bar Plot with Customized Major and Minor Gridlines
================================================================================

FULL QUESTION:
Task:
Write a Python program to create a bar plot from a DataFrame with custom styling:
- Sample DataFrame with columns ['a', 'b', 'c', 'd', 'e'] and index [2, 4, 6, 8, 10].
- Plot grouped bars with distinct colors.
- Major gridlines: green color, solid style ('-'), linewidth 0.5.
- Minor gridlines: black dotted style (':'), linewidth 0.5.
- Turn on minor tick marks.

SHORT QUESTION:
Grouped bar plot generation with dual-level green major and black dotted minor gridlines.

================================================================================
README & SETUP INSTRUCTIONS:
================================================================================
# Question 46: Grouped Bar Plot with Customized Major and Minor Gridlines

- Prerequisites: Python 3.x, Pandas, Matplotlib (pip install pandas matplotlib).
- Setup: None.
- How to Run: python question_46.py
- Expected Behavior: Plots grouped bar chart with custom color sequence and dual major/minor styled gridlines.

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

1. question_46.py
--------------------------------------------------------------------------------
import pandas as pd
import matplotlib.pyplot as plt

data = {
    'a': [4, 2, 4, 2, 2],
    'b': [8, 3, 7, 6, 4],
    'c': [5, 4, 4, 4, 3],
    'd': [7, 2, 7, 8, 3],
    'e': [6, 6, 8, 6, 2]
}
index = [2, 4, 6, 8, 10]

df = pd.DataFrame(data, index=index)

ax = df.plot(
    kind='bar',
    figsize=(8, 5),
    width=0.8,
    color=['b', 'g', 'r', 'c', 'm']
)

plt.grid(which='major', color='green', linestyle='-', linewidth=0.5)
plt.minorticks_on()
plt.grid(which='minor', color='black', linestyle=':', linewidth=0.5)

plt.show()
--------------------------------------------------------------------------------
