필터 지우기
필터 지우기

Hist3 error when displayed

조회 수: 1 (최근 30일)
Bran
Bran 2016년 7월 18일
I am turning a scatter plot into a matrix where the number in each 'pixel' is the number of scatter points in that bin
I have been using hist3() to help me do this. If for example I have values ranging from -0.4 to 0.4 in the x axis and 0 to 10 in the y axis on the scatter plot. I have been calling up the Data = [ xvalues, yvalues]
I have been using [num,bincenters] = hist3(Data,{-0.45:0.02:0.45 -0.5:0.02:10.5})
xcenters = bincenters{1} ycenters = bincenters{2}
then imagesc(xcenters,ycenters,num)
The shape seems correct, however, the graph seems to be shifted and so not sitting in quite the correct place in terms of the x and y axis. What am I doing wrong?

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by