Matplotlib Show Text Below Subplot

Sep 13, 2020
import mathcol = 3image_count = len(images)row = math.ceil(image_count/col)plt.figure(figsize=(col*4,row*4))for i, img_path in enumerate(images):    img_path = str(img_path)        img = plt.imread(img_path)    p = plt.subplot(row, col, i + 1)    plt.imshow(img)    # text above img    plt.title("TOP TEXT")    # text brlow img    plt.text(0.5, -0.1, "BOTTOM TEXT",  transform=p.transAxes)        plt.axis("off")

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.