Answers for "matplotlib handle sub plots"

2

get subplots in matplotlib

fig,ax = plt.subplots(3,2,figsize=(25,10),)

i,j = 0,0
for each in list_of_images:
    img = cv.imread(each.name)
    ax[i,j].imshow(img)
   

    if j == 1:
        j = 0
        if i != 2:
            i += 1
    else:
        j += 1
Posted by: Guest on December-22-2020
0

import matplotlib sub

#"plt" is the standard alias.

import matplotlib.pyplot as plt
Posted by: Guest on August-14-2021

Python Answers by Framework

Browse Popular Code Answers by Language