How to count and plot the number of points in a grid?
Afficher commentaires plus anciens
I have a huge data set of more than 19,00,000 points. By point I meant x and y. I am creating a 20*20 minor grid in my plot. I would like to count the number of points that fall in a single grid cell and plot/print the number (of points) in the grid itself in an another plot. I tried to look at hist3() and histcounts2() functions but, couldn't get a hold of it.
Please find attached the picture of the figure.
Please help. Thanks in advance.
3 commentaires
Rik
le 17 Fév 2021
histcounts2 was introduced in R2015b. It is in the base Matlab product. If you are using a release prior to that, you should really mention it.
If you mean you couldn't get it to work, did you read the documentation? What did you try?
Bhanu Pratap Singh
le 18 Fév 2021
Modifié(e) : Bhanu Pratap Singh
le 18 Fév 2021
Rik
le 18 Fév 2021
Why do you think there might be something wrong? I'm on mobile so I can't run your code, but nothing jumps out at me from your code.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Data Distribution Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!