% Reflect the y values, and shift the phi values by pi and then mod them % by 2*pi: % Next are the commands format long; A=load('outfile_start3.txt'); Af = find((A(:,2) >= 2*pi*0.372) & (A(:,2) <= 2*pi*0.43)); Anew = A(Af, :); Ay = [-Anew(:,3) mod(Anew(:,4)-pi,2*pi)]; B=load('outfile_start4.txt'); Bf = find((B(:,2) >= 2*pi*0.372) & (B(:,2) <= 2*pi*0.43)); Bnew = B(Bf,:); By = [-Bnew(:,3) mod(Bnew(:,4)-pi,2*pi)]; plot(Ay(:,2),Ay(:,1),'k',By(:,2),By(:,1),'b'); plot([2*pi*0.372 2*pi*0.43], [-0.63 -0.63], 'r'); plot([2*pi*0.372 2*pi*0.43], [-0.7 -0.7], 'r'); plot([2*pi*0.372 2*pi*0.372], [-0.63 -0.7], 'g'); plot([2*pi*0.43 2*pi*0.43], [-0.63 -0.7], 'g'); %axis([2*pi*0.372 2*pi*0.43 -0.70 -0.63]) %axis([2*pi*0.40 2*pi*0.50 -0.70 -0.63]) Testing axes length title('A Horseshoe'); xlabel('\Phi_f'); ylabel('Y_f');