Arguments and values

Report a typo

Your collegue has plotted the data on number of houses sold in your town this spring and summer. Here's the plot:

Match the arguments to get the error bar plot

They've sent you the code, but somehow all the arguments inside plt.errorbar() got mixed up! Here's the code:

x = ['March', 'April', 'May', 'June', 'July', 'August']
y = [146, 167, 180, 192, 160, 158]
yerr = 4.1

# place for the plt.errorbar()

plt.title('Houses sold in your town')
plt.xlabel('Months')
plt.ylabel('Number of houses')

Match arguments of plt.errorbar() to their values. Note that there's one extra argument and one extra value in the list below.

Match the items from left and right columns
yerr
capsize
ecolor
errorevery
fmt
this value is not needed
2
yerr
4
this argument is not needed
"deeppink"
True
___

Create a free account to access the full topic