Guest User

Untitled

a guest
Feb 23rd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. SmoothDensityHistogram[data, Automatic,"PDF",ColorFunction->
  2. "AvocadoColors",PlotRangePadding->None,PlotPoints->200]
  3.  
  4. n = 10000000;
  5. r2 = 0.1;
  6. choise = RandomChoice[{[Pi] r2, 1} -> {0, 1}, n];
  7. box = RandomReal[1, {n, 2}];
  8. circle = Transpose@{0.5 + # Cos@#2, 0.5 + # Sin@#2} &[
  9. Sqrt@RandomReal[r2, n], RandomReal[2 [Pi], n]];
  10. pts = box choise + circle (1 - choise);
  11.  
  12. Grid[{{ListPlot[pts[[;; ;; 300]], AspectRatio -> Automatic,
  13. PlotLabel -> "Data"],
  14. SmoothDensityHistogram[pts[[;; ;; 300]], Automatic,
  15. PlotRange -> {{0, 1}, {0, 1}},
  16. PlotLabel -> "Bandwidth = Automatic"]},
  17. {SmoothDensityHistogram[pts[[;; ;; 300]], .1,
  18. PlotRange -> {{0, 1}, {0, 1}},
  19. PlotLabel -> "Bandwidth = 0.1"],
  20. SmoothDensityHistogram[pts[[;; ;; 300]], .02,
  21. PlotRange -> {{0, 1}, {0, 1}},
  22. PlotLabel -> "Bandwidth=0.02"]}}]
Add Comment
Please, Sign In to add comment