Guest User

Untitled

a guest
Jan 23rd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. data = Flatten[Table[
  2. {x, y, PDF[MultinormalDistribution[{0, 0}, {{0.2, 0.1}, {0.1, 0.4}}],{x, y}]},
  3. {x, -2, 2, 0.01}, {y, -2, 2, 0.25}],1];
  4.  
  5. gb = GatherBy[data, #[[2]] &];
  6.  
  7. cLines = Transpose[{
  8. ColorData["BlueGreenYellow"] /@ Rescale[Range[Length[gb]]],
  9. Line /@ gb
  10. }];
  11.  
  12. Graphics3D[
  13. {Thick, cLines},
  14. Axes -> True, Boxed -> False, BoxRatios -> {1, 1, 1},
  15. FaceGrids -> {{-1, 0, 0}, {0, 1, 0}, {0, 0, -1}},
  16. AxesLabel -> {"x", "y", "z"}, PlotRangePadding -> None]
  17.  
  18. f[x_, y_] := Exp[-x^2 - y^2/(4 + x^2/4) + x y];
  19. ParametricPlot3D[Table[{x, y, f[x, y]}, {y, -5, 5}], {x, -5, 5},
  20. PlotRange -> All]
Add Comment
Please, Sign In to add comment