Phase portrait for Lorenz system [duplicate]

This question already has an answer here:

I'm trying to visualize the phase diagram for a multidimensional system of differential equations, but projected down onto only 2D phase planes.

I've tried using the Lorenz system as a simpler case because it's in 3 variables, but I can't get the streamplot to work.

I setup the system as

lorenz[σ_, r_, b_, x0_, y0_, z0_] := {
x'[t] == σ*(y[t] - x[t]),
y'[t] == r*x[t] - y[t] - x[t]*z[t],
z'[t] == x[t]*y[t] - b*z[t],
x == x0,
y == y0,
z == z0
}

followed by

sol= NDSolve[lorenz[10, 28, 8/3, 0.1, 0.1, 0], {x[t], y[t], z[t]}, {t, 0, 30}]
ParametricPlot[Evaluate[{x[t], y[t]} /. sol], {t, 0, 30}]

And that works to plot a specific trajectoy in 2D space. But what I want is a streamplot in the xy-plane.

I tried

lorenzstream[σ_, r_, b_] := {
x' == σ*(y - x),
y' == r*x - y - x*z,
z' == x*y - b*z
}

StreamPlot[lorenzstream[10, 28, 8/3][[{1, 2}, 2]], {x, -20, 20}, {y, -20, 20}]

It did not seem to work. Any help appreciated.

marked as duplicate by zhk, MarcoB, Edmund, m_goldberg plotting StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jun 8 '17 at 22:23

• reference.wolfram.com/language/ref/ParametricPlot3D.html this can be helpful for 3D phase diagrams. – optimal control Jun 8 '17 at 15:42
• What about for 2D phase diagrams? I want to visualize the x-y plane, but because y has some dependence on z, it's proving tricky. I'd like to visualize everything projected onto x-y, without just setting z to be 0. – John Jun 8 '17 at 15:47
• Something like this? ContourPlot3D[{10 (-x + y), 28 x - y - x z, x y - (8 z)/3}, {x, -2, 2}, {y, -2, 2}, {z, -3, 3}, ViewPoint -> Top] – zhk Jun 8 '17 at 16:01 