Complete the code to apply the seaborn style to Matplotlib plots.
import matplotlib.pyplot as plt plt.style.use('[1]') plt.plot([1, 2, 3], [4, 5, 6]) plt.show()
The plt.style.use function applies a style to Matplotlib plots. Using "seaborn" applies the seaborn style.
Complete the code to create a scatter plot with seaborn style applied.
import matplotlib.pyplot as plt plt.style.use('seaborn') x = [1, 2, 3, 4] y = [10, 20, 25, 30] plt.[1](x, y) plt.show()
plt.plot which creates a line plot instead of scatter.plt.bar which creates bar charts.The scatter function creates a scatter plot, which shows points for x and y values.
Fix the error in the code to correctly apply seaborn style and plot a histogram.
import matplotlib.pyplot as plt plt.style.use('seaborn') data = [1, 2, 2, 3, 3, 3, 4] plt.hist(data, bins=[1]) plt.show()
The bins parameter expects an integer number of bins, not a string or keyword as a string.
Fill both blanks to create a line plot with seaborn style and add a grid.
import matplotlib.pyplot as plt plt.style.use('[1]') plt.plot([1, 2, 3], [3, 2, 1]) plt.[2](True) plt.show()
plt.grid(True).Use "seaborn" style for the plot and plt.grid(True) to show the grid lines.
Fill all three blanks to create a seaborn style bar chart with labels.
import matplotlib.pyplot as plt plt.style.use('[1]') categories = ['A', 'B', 'C'] values = [5, 7, 3] plt.bar(categories, values) plt.xlabel('[2]') plt.ylabel('[3]') plt.show()
Use "seaborn" style, label x-axis as "Category" and y-axis as "Value" for clarity.