I use hist3() function to plot the density of points. It creates a grid and finds the number of points in each grid, then it creates the plot. But the colors on the plot are discrete. Is there an option to make this distribution smooth, i.e. make transition from one color to another smoother. Now all the cells of the grid have different colors, from grin to yellow and the distribution is not apparent.
I use the following code.
axis equal;
colormap(jet);
n = hist3(final',[40,40]);
n1 = n';
n1( size(n,1) + 1 ,size(n,2) + 1 ) = 0;
xb = linspace(min(final(:,1)),max(final(:,1)),size(n,1)+1);
yb = linspace(min(final(:,2)),max(final(:,2)),size(n,1)+1);
pcolor(xb,yb,n1);
Thanks in advance.

colormap(). - Olegmatplotlibdoes smoothing by default of images shown byimshow. If you're willing to try it, it's very much worth it. - rubenvb