I want to show two different data in the same figure and I want to show densities of each data with colors. I used below code:
scatter(xm,ym,[],c/(max(c)),'filled','d')
hold on
scatter(x,y, [], dens,'filled','d')
but it only shows data (x,y) colored and data xm and ym are all red. When I use scatter(xm,ym,[],c/(max(c)),'filled','d') without using scatter(x,y, [], dens,'filled','d'), it shows xm and ym data colored.But when I use both scatters with a hold on between them, the error I mentioned occurs. How can I solve the problem? could anyone help?