Why is matplotlib not plotting some boxplots?

I am trying to plot some data so get statistics about it, but matplotlib simply can't plot it as boxplots. I tried with histograms and it workd well:

But when i change the code to plot boxplots it just doesnt work:

I know that the y axis is in the wrong place, but I even searched on where it should be (for example SAQRS in the range of -150 to 50) but even there there is nothing. The plotting code is below:

fig, axs = plt.subplots(2, 5)
axs = axs.flatten()
for ax, colm, colf in zip(axs, masc, fem):
    ax.boxplot(masc[colm])
    ax.boxplot(fem[colf])
    ax.set_title(colm)
plt.show()

I tried in MATLAB to see if the problem is in the dataset and the plots worked perfectly, but i need to do it in python because of some operations i have to do (i am not good at matlab to do so)

Topic matplotlib

Category Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.