← Back to Dashboard

Data Visualization Matplotlib Seaborn: Hard Exercises HARD

"""
Topic 09: Data Visualization (Matplotlib & Seaborn) - HARD Exercises (10)
"""

# Exercise 1: Pair Plot - Use sns.pairplot() on a multi-column dataset (like 'iris' or 'tips') 
# to see relationships between all numerical variables.
# Write your code below:


# Exercise 2: Customizing Themes - Create a figure with 4 subplots showing different plot types. 
# Apply a custom color palette using sns.color_palette().
# Write your code below:


# Exercise 3: Correlation Visualization - Calculate the correlation matrix for a DataFrame 
# and use sns.heatmap() to visualize it with actual values (annot=True).
# Write your code below:


# Exercise 4: Time Series Visualization - Create a plot showing a stock price variation 
# over time with shaded regions (plt.fill_between) representing uncertainty or range.
# Write your code below:


# Exercise 5: Regression Plot - Use sns.regplot() to visualize the relationship between 
# two variables and include a 95% confidence interval for the regression.
# Write your code below:


# Exercise 6: Complex Subplots - Use GridSpec to create a complex layout where 
# one plot takes up two columns and two smaller plots sit below it.
# Write your code below:


# Exercise 7: Interactive Legend - Create a plot where clicking on the legend 
# toggles the visibility of the corresponding line (Hint: Requires matplotlib interactive backend).
# Write your code below:


# Exercise 8: FacetGrid - Use Seaborn's FacetGrid to create a grid of plots 
# based on categorical variables (e.g., one plot for each 'day').
# Write your code below:


# Exercise 9: Distribution Comparison - Create a plot with multiple overlapping KDE plots 
# showing the distributions of 3 different categories with transparency (alpha).
# Write your code below:


# Exercise 10: Advanced Dashboard - Use subplots to create a "Dashboard" showing 
# Total Sales (Bar), Sales Trend (Line), and Revenue Distribution (Pie).
# Write your code below: