matplotlibのArtistの階層構造
matplotlibのArtist(ユーザが意識して使っているクラス、FigureとかAxesとかAxisとか)は普通は階層構造を持つことになる。
例えば次のように図を作ると:
>>> fig = plt.figure() >>> ax1 = fig.add_subplot(211) >>> line = ax1.plot(np.sin(np.arange(0,10,0.1))) >>> ax2 = fig.add_subplot(212) >>> scat = ax2.scatter(*(np.random.rand(2,100))) >>> fig.show()
次のように階層構造があらわれる: