Reputation: 3145
It seems to me figure() is the higher level controller according to the user manual http://matplotlib.org/api/figure_api.html
But any guru further enlighten the differences between figure() and plot()?
Upvotes: 2
Views: 901
Reputation: 85482
from matplotlib import pyplot as plt
This:
plt.plot(range(10))
is just a shortcut for:
fig = plt.figure()
sub = fig.add_subplot(111)
sub.plot(range(10))
The latter gives your more fine-grained control over many things.
Upvotes: 3