Home>
What i don't understand

I'm not in trouble so much, but it was a mystery, so I would like to ask you a question.

import matplotlib.pyplot as plt
x = range (10)
y = range (10)
fig = plt.figure () #Create figure object
ax = fig.add_axes ([0.3,0.3,0.8,0.8]) #Create axes object
ax.plot (x, y)
print (fig.axes, ax)

Whereas there is no error above

import matplotlib.pyplot as plt
x = range (10)
y = range (10)
fig = plt.figure () #Create figure object
ax = fig.add_axes (rect = [0.3,0.3,0.8,0.8]) #Create axes object
ax.plot (x, y)
print (fig.axes, ax)


Why do I get an error?
The variable isrectIsn't it?