Computer scienceData scienceInstrumentsVisualizationKinds of graphs

Matplotlib violin plot

Setting the title

Report a typo

Suppose you want to show the title, so the resulting violin plot is as follows.

Write the correct instruction that shows only the title of the chart.

import matplotlib.pyplot as plt

data2021 = [0, 20, 20, 50, 85, 20, 20, 20, 70, 90, 10, 0]
fig, axes = plt.subplots()

# Your line of code here

sales=plt.violinplot(data2021, showextrema=True, quantiles=[0.25, 0.75, 0.9])
sales['cquantiles'].set_color('r')
plt.show()

The graph should look as follows:

Show the title on the violin plot

You need to write only one line in the text field below.

Enter a short text
___

Create a free account to access the full topic