Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data = Flatten[Table[
- {x, y, PDF[MultinormalDistribution[{0, 0}, {{0.2, 0.1}, {0.1, 0.4}}],{x, y}]},
- {x, -2, 2, 0.01}, {y, -2, 2, 0.25}],1];
- gb = GatherBy[data, #[[2]] &];
- cLines = Transpose[{
- ColorData["BlueGreenYellow"] /@ Rescale[Range[Length[gb]]],
- Line /@ gb
- }];
- Graphics3D[
- {Thick, cLines},
- Axes -> True, Boxed -> False, BoxRatios -> {1, 1, 1},
- FaceGrids -> {{-1, 0, 0}, {0, 1, 0}, {0, 0, -1}},
- AxesLabel -> {"x", "y", "z"}, PlotRangePadding -> None]
- f[x_, y_] := Exp[-x^2 - y^2/(4 + x^2/4) + x y];
- ParametricPlot3D[Table[{x, y, f[x, y]}, {y, -5, 5}], {x, -5, 5},
- PlotRange -> All]
Add Comment
Please, Sign In to add comment