Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SmoothDensityHistogram[data, Automatic,"PDF",ColorFunction->
- "AvocadoColors",PlotRangePadding->None,PlotPoints->200]
- n = 10000000;
- r2 = 0.1;
- choise = RandomChoice[{[Pi] r2, 1} -> {0, 1}, n];
- box = RandomReal[1, {n, 2}];
- circle = Transpose@{0.5 + # Cos@#2, 0.5 + # Sin@#2} &[
- Sqrt@RandomReal[r2, n], RandomReal[2 [Pi], n]];
- pts = box choise + circle (1 - choise);
- Grid[{{ListPlot[pts[[;; ;; 300]], AspectRatio -> Automatic,
- PlotLabel -> "Data"],
- SmoothDensityHistogram[pts[[;; ;; 300]], Automatic,
- PlotRange -> {{0, 1}, {0, 1}},
- PlotLabel -> "Bandwidth = Automatic"]},
- {SmoothDensityHistogram[pts[[;; ;; 300]], .1,
- PlotRange -> {{0, 1}, {0, 1}},
- PlotLabel -> "Bandwidth = 0.1"],
- SmoothDensityHistogram[pts[[;; ;; 300]], .02,
- PlotRange -> {{0, 1}, {0, 1}},
- PlotLabel -> "Bandwidth=0.02"]}}]
Add Comment
Please, Sign In to add comment