Код: Выделить всё
import numpy as np
import matplotlib.pyplot as plt
t = np.arange(1000)/100.
x = np.sin(2*np.pi*10*t)
y = np.cos(2*np.pi*10*t)
fig = plt.figure()
ax1 = plt.subplot(211)
plt.plot(t,x)
ax2 = plt.subplot(212)
plt.plot(t,y)
# some code to share both x axes
plt.show()
Как мне это сделать? Есть некоторые важные атрибуты звучания
Код: Выделить всё
_shared_x_axes
Код: Выделить всё
fig.get_axes()
Подробнее здесь: https://stackoverflow.com/questions/429 ... en-created