In [12]:
using Plots
pyplot()
Plots.plot();


2016-04-29 20:26:21.599 julia[26615:593341] setCanCycle: is deprecated.  Please use setCollectionBehavior instead

In [13]:
m = [3 -1; 1 0]


Out[13]:
2x2 Array{Int64,2}:
 3  -1
 1   0

In [14]:
eig(m)


Out[14]:
([2.618033988749895,0.38196601125010515],
2x2 Array{Float64,2}:
 0.934172  0.356822
 0.356822  0.934172)

In [15]:
N = 40
x = zeros(N, N)
vals = collect(linspace(-6, 6, N))
for i in 1:N
  for j in 1:N
    x[j, i] = vals[i]
  end
end
y = x';

In [16]:
u = zeros(N, N)
u -= m[1, 1]*x + m[1, 2]*y
v = zeros(N, N)
v += m[2, 1]*x + m[2, 2]*y;

In [17]:
PyPlot.streamplot(x, y, u, v, color=:blue, density=0.6)


Out[17]:
PyObject <matplotlib.streamplot.StreamplotSet object at 0x3286c1310>

In [19]:
plot!(title = "Streamplot", xlabel = "x", ylabel = "y")
plot!(-5:5, rand(10))


Out[19]:

In [ ]:


In [ ]: