How to fix the event density within bins?
1 ビュー (過去 30 日間)
My script is working well, but i unable to descritize within each bin.
Here is my script:
resolution = [90, 90];
[n, q] = hist3(data, resolution);
a = colorbar;
a.Label.String = 'Event count';
here is what i get
here is what , I am looking for (e.g. grid lines at an interval of 0.01)
回答 (1 件)
dpb 2022 年 6 月 25 日
If you want 10 bins each direction, then change the resolution to match; your code use 90 in each direction which will give the much finer/smaller individual squares.
You can use grid on to draw the grids, setting
will let you customize the apperance. Major grid lines show only on tick values; you'll set the tick values at the locations wanted; you may then want to set the tick labels independently. I'd also then set the
so get same precision displayed on all tick labels -- this just irritates me no end isn't done by default; it's just plain ugly as is with the default '%g'
I didn't experiment to see with your ranges if you just might get lucky and get the other gridlines with minor ticks where you want them; unfortunately, you can't control the number nor placement of them; they're either on or off and the number between major ticks is internally generated.
Find more on Subplots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!