フィルターのクリア

How to preserve colors in histogram2

1 回表示 (過去 30 日間)
Kostas
Kostas 2018 年 11 月 21 日
編集済み: Image Analyst 2018 年 11 月 21 日
Hello all,
i try to plot 5 datasets using histogram2 and hold on. I realize that the colors are not preserved (colors not showing correctly the number of points, see below for a better explanation). It looks like an overlapping issue.
Below is the piece of cde used in a loop to plot all 5 datasets.
for i2=1:5
lonf = data(:,i2);
latf = data1(:,i2);
subplot(ax2), histogram2(lonf,latf,'BinWidth',[10 5],'FaceColor',nco(i2,:),...
'EdgeColor',nco(i2,:));hold(ax2,'on')
end
where: nco=new color order from matlab and
latf and lonf are read each time in the loop
In the attached figure, you see the edges which delimitate different datasets. For example, there is a blue edge in the green bar. The color below the blue edge should have been blue, etc but it's green. I would appreciate any help for solving this issue.
image003.jpg
Thank you in advance
Kostas

回答 (0 件)

カテゴリ

Help Center および File ExchangeHistograms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by