Код
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
print type(ax)
дает выход
<class 'matplotlib.axes.AxesSubplot'>
Тогда код
import matplotlib.axes
matplotlib.axes.AxesSubplot
вызывает исключение
AttributeError: 'module' object has no attribute 'AxesSubplot'
Подводя итог, существует класс matplotlib.axes.AxesSubplot
, но модуль matplotlib.axes
не имеет атрибута AxesSubplot
. Что происходит дальше?
Я использую Matplotlib 1.1.0 и Python 2.7.3.