'Matplotlib subplots column wrap

Does Matplotlib have a built-in column wrap method?

The following image shows an analogous method in Seaborn's catplot.

Screenshot of Seaborn col_wrap usage in the catplot documentation.

Purpose...

I have a function that plots N images with plt.imshow(). The number of images can varies, from about 20 to 50. I am using subplots to tile them, and would like to automate the number of 'rows' by using a wrapping function such as the one mentioned above.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source