In [2]:
;cd ..
In [51]:
include("henon.jl")
Out[51]:
In [73]:
function henon_plot_points(N, a, b)
data = zeros(N, 2)
x0 = [(2rand()-1)/2, (2rand()-1)/2]
for i in 1:N
output = f(x0, a, b)
data[i, 1:2] = output
x0 = f(output, a, b)
end
data
end
Out[73]:
In [63]:
using PyPlot
In [74]:
a = 1.4; b = 0.3
for i in 1:40
points = henon_plot_points(200, a, b);
plt.plot(points[:,1], points[:,2], "b.", markersize=1, alpha=0.3)
end
plt.xlim(-1.5, 1.5)
plt.ylim(-0.5, 0.5)
#plt.xlabel(L"$\theta$")
#plt.ylabel(L"$\phi$")
xlabel("x")
ylabel("p")
plt.savefig("henon.pdf")
In [ ]: