s = tf(np.array([1,0]),np.array([0,1]))
G = (s+1)/(s-2)
Gtrue = (s+0.9)/(s-1.9)
K = 1/G
L = K*Gtrue
fig = plt.figure()
gm, pm, wg, wp = margin(L)
_,_,_ = bode(L)
for ax in fig.axes:
xl = ax.get_xlim()
yl = ax.get_ylim()
ax.plot(wg*np.ones(2),ax.get_ylim(),'k--',linewidth=2)
ax.plot(wp*np.ones(2),ax.get_ylim(),'k--',linewidth=2)
ax.plot(ax.get_xlim(),np.zeros(2),'k--',linewidth=2)
ax.set_xlim(xl)
ax.set_ylim(yl)
CL = feedback(L,1)
CL