← Back to Dashboard

Data Visualization Matplotlib Seaborn: Medium Exercises MEDIUM

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

# Exercise 1: Multi-line Plot - Plot y1 = x^2 and y2 = x^3 on the same graph for x from 0 to 5. 
# Use different colors and a legend.
# Write your code below:


# Exercise 2: Seaborn Heatmap - Create a 10x10 matrix of random numbers and 
# visualize it using sns.heatmap().
# Write your code below:


# Exercise 3: Categorical Plot - Using the 'tips' dataset (built-in Seaborn), 
# create a boxplot showing the 'total_bill' across different 'days' of the week.
# Write your code below:


# Exercise 4: Scatter Plot Customization - Create a scatter plot and vary the 
# size (s) and color (c) of the points based on a third numerical variable.
# Write your code below:


# Exercise 5: Histogram with KDE - Use Seaborn's sns.histplot() to show the distribution of 
# a random dataset, including the Kernel Density Estimate (KDE) line.
# Write your code below:


# Exercise 6: Violin Plot - Create a violin plot to compare the 'size' of the group 
# between 'smokers' and 'non-smokers' in the 'tips' dataset.
# Write your code below:


# Exercise 7: Plotting with DataFrames - Create a Pandas DataFrame with Month and Sales. 
# Use df.plot(kind='line') to visualize it.
# Write your code below:


# Exercise 8: Joint Plot - Create a joint plot using sns.jointplot() to show 
# both the scatter plot and the histograms of two variables.
# Write your code below:


# Exercise 9: Annotation - Plot a point (2, 4) and use plt.annotate() to label it "Critical Point".
# Write your code below:


# Exercise 10: Formatting Axes - Create a plot and change the rotation of the x-axis tick labels to 45 degrees.
# Write your code below: