Computer scienceData scienceInstrumentsVisualizationKinds of graphs

Matplotlib violin plot

Parameters implementation

Report a typo

Suppose you want to show the quantiles, so the resulting violin plot looks as follows:

Set the quantiles colors to red on the violin plot

Write the correct instruction that shows the quantiles of the sales in red color:

import matplotlib.pyplot as plt

data2021 = [0, 20, 20, 50, 85, 20, 20, 20, 70, 90, 10, 0]
fig, axes = plt.subplots()
sales=plt.violinplot(data2021, showextrema=True, quantiles=[0.25, 0.75, 0.9])

# Your line of code here

plt.show()
Enter a short text
___

Create a free account to access the full topic