Density plot of a 2D matrix

조회 수: 9 (최근 30일)
hamed
hamed 2021년 1월 10일
댓글: hamed 2021년 1월 10일
Hi :)
I have a 2D matrix and I want to plot the number of accurence for each element at each row as the density plot (please see the attached plot).
In other words, each background color shows the probability (count) of each sample.
Thanks.
  댓글 수: 2
Image Analyst
Image Analyst 2021년 1월 10일
I don't understand. I imagine the image is your 2-D matrix and you've applied a colormap to it. But what is the black line plot? The "number of occurrence" to most people means "histogram". But if you had a histogram for each row, you would have multiple values, not just the one value you're plotting at each row. Even if you took the histogram of the entire array, it would be misleading and deceptive to plot the histogram going vertically down the rows. So attach your data, and explain the black curve.
hamed
hamed 2021년 1월 10일
I attached my data. Forget about the black line. I just to plot my data (501*381) as the density plot. the same as the figure I attached as the example above.
Thanks

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by