Complete the code to import the matplotlib plotting library.
import [1] as plt
We import matplotlib.pyplot as plt to create plots.
Complete the code to create a box plot of the data list.
plt.[1](data)The boxplot function draws a box plot to show data distribution.
Fix the error in the code to create a violin plot of the data list.
plt.[1](data)The violinplot function draws a violin plot which shows data distribution shape.
Fill both blanks to create side-by-side box and violin plots for the same data.
fig, ax = plt.subplots() ax.[1](data, positions=[1]) ax.[2](data, positions=[2]) plt.show()
Use boxplot and violinplot methods on the same axes to compare plots side-by-side.
Fill all three blanks to create labeled box and violin plots with titles and axis labels.
fig, ax = plt.subplots() ax.[1](data, positions=[1]) ax.[2](data, positions=[2]) ax.set_xticks([1, 2]) ax.set_xticklabels([[3]]) ax.set_title('Box vs Violin Plot') plt.show()
First create boxplot, then violinplot. Then label x-axis ticks with descriptive names.
