Most examples of object oriented matplotlib get an Axis object with something like
import matplotlib.pyplot as plt fig1 = plt.figure() ax1 = fig1.add_subplot(111) ax1.plot(...... etc.
Which I always considered unobvious, especially from the point of view of matlab. I recently discovered that equivalent results can be obtained using
ax1 = fig1.gca() # "GetCurrentAxis"
This makes me more intelligent (perhaps only because of the use of Matlab in the past). Why add_subplot () with a confusing 111 argument selected as the preferred way to get the axis object? Is there any functional difference?
Thanks!
source share