2

Recently, I moved from R to python. Basically, I can quickly find a good alternative to R function in python except smoothScatter. I searched a lot and found these two answers helpful:

But both of them are relatively complicated and slow compared to R (I have about 2,000,000 data points and scipy.stats.gaussian_kde is really slow). So is there a simple python package can replace smoothScatter in R?

smoothScatter in R

smoothScatter

Community
  • 1
  • 1
  • @cbuchart Thanks for helping me edit my question!(Although I am not sure if it is appropriate to say here, seems not relevant to question.) I will pay more attention next time. – AlicePsyche May 10 '17 at 02:13

1 Answers1

0

Although not the exact same output, your plots remind me of HexBin plots, available through matplotlib, and Seaborn.

enter image description here

Diziet Asahi
  • 38,379
  • 7
  • 60
  • 75
  • Thanks for your response! But the problem is that `HexBin` result is not smooth enough...and when I try to increase bin number, it becomes very slow(seaborn is stuck...). I can calculate kernel density then plot in python but it needs many adjustments. I am just wondering why there is not a simple Python package that can replace `smoothScatter` in R ... – AlicePsyche May 10 '17 at 02:03
  • weird, on my machine with two series of 2E6 points, seaborn takes ~5 sec to generate the hex jointplot. – Diziet Asahi May 10 '17 at 18:03