Articles → Matplotlib → figure object and subplots function in matplotlib

figure object and subplots function in matplotlib






Figure object










import matplotlib.pyplot as plt

fig = plt.figure()





Subplots function




import matplotlib.pyplot as plt

fig = plt.figure()

X = plt.subplots(nrows = 2, ncols= 2)  # a figure with a 2x2 grid of Axes

x = 0
while x < len(X):
    print(X[x])
    x = x + 1

plt.show()




Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, June 11, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250