Scatter plot with density in Matlab

 I would like to plot data set 1 and data set 2 in one plot vertical. Unfortunately the data is huge, so it is just a smear of points and can't see the density. I tried hist3 and other suggestions but it overwrites my data sets and the binning looks awful.

Is there another way to plot scatter density plots? Is there really no Matlab function for it? If not, which program could I use to easy generate such a plot?

A mix between this two examples:  

 NOTE:-


Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. 

Answers: 

What's wrong with computing hist3 and displaying the result with imagesc

 

data1 = randn(1,1e5); %// example data
data2 = randn(1,1e5) + .5*data1 ; %// example data correlated to above
values = hist3([data1(:) data2(:)],[51 51]);
imagesc(values.')
colorbar
axis equal
axis xy

If you want to have the axes in accordance with the true data values: use the second output of hist3 to obtain the positions of the bin centers, and pass them to imagesc

  

SEE COMPLETE ANSWER CLICK THE LINK 

https://matlabhelpers.com/questions/scatter-plot-with-density-in-matlab.php

Comments

Popular posts from this blog

Why do I get a "Too many input arguments" error when not passing any?

programmingshark

Why Red, Green, Blue channels of image separetely are grayscaled (Matlab)?