Я использую вспомогательные сюжеты в функции, которая использует входные данные виджета-ползунка, чтобы вычислить некоторые вещи и построить результаты. Я хочу включить сетку для всех участков сюжета ax1. Но почему-то jupternotebooks включает его только на последнем сюжете ...
import numpy as np
from matplotlib import pyplot as plt
import ipywidgets as widgets
from IPython.html.widgets import interact
%matplotlib inline
## Plot
fig, ax1 = plt.subplots(6,2)
plt.subplots_adjust(right = 2, top = 8 )
# Show the major grid lines with dark grey lines
plt.grid(b=True, which='major', color='#666666', linestyle='-')
# Show the minor grid lines with very faint and almost transparent grey lines
plt.minorticks_on()
plt.grid(b=True, which='minor', color='#999999', linestyle='-', alpha=0.2)
## Giergeschwindigkeit über v und ay
ax1[0,0].plot(v_ms, omega)
ax1[0,0].set_ylabel('Giergeschwindigkeit [rad/s]')
ax1[0,0].set_xlabel('Geschwindigkeit [m/s]')
ax1[0,0].set_title('Giergeschwindigkeit über Geschwindigkeit')
# ... more subplots
plt.show()
Это выглядит так: ![enter image description here](https://i.stack.imgur.com/3szuL.png)
И вы можете объяснить мне почему в моем случае
ax1.grid()
выдает ошибку?
AttributeError: 'numpy.ndarray' object has no attribute 'grid'