@ ImportanceOfBeingErnest дает хорошее решение
Используйте axs[0].set_xlim
вместо plt.xlim
import numpy as np
# f, axs = plt.subplots(1,2,figsize=(8,3),sharex=True, sharey=True)
f, axs = plt.subplots(1,2,figsize=(8,3))
x = np.array([])
y = np.array([])
for r in range(2):
x = np.append(x, np.array([-r,2*r,-r]))
y = np.append(y, np.array([2*r,-r,-r]))
axs[0].plot(x,y)
axs[0].scatter(x,y)
axs[0].set_xlim(-1,2)
axs[0].set_ylim(-1,2)
print(list(zip(x,y)))
x = np.array([])
y = np.array([])
for r in range(2):
x = np.append(x, np.array([-r,r,-r]))
y = np.append(y, np.array([r,-r,-r]))
axs[1].plot(x,y)
axs[1].scatter(x,y)
axs[1].set_xlim(-1,2)
axs[1].set_ylim(-1,2)
print(list(zip(x,y)))