フィルターのクリア

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 Center および File ExchangeScatter Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by