function pts = rk_stab(s, linespec)
%RK_STAB Plots the domain of stability for specified Runge-Kutta method
% using the specified linespec

pts = zeros(s*360,1);
for idx = 0:s:359
    e = exp(pi*idx*1j/180);
    pts((idx*s+1):((idx+1)*s)) = roots([1./factorial(s:-1:1) 1-e]);
end
% The following sort is only useful for s<=4
arg = angle(pts+1);
[~,idx] = sort(arg);
plot(pts(idx), linespec);
