Why pcolor and m_pcolor do not use every colors in the figure?
1 次查看(过去 30 天)
显示 更早的评论
I have a problem with creating map by m_pcolor. I use MatlabR2013a. I tried to create a map by m_map toolbox using same colorbar is used as the one used at'http://koeppen-geiger.vu-wien.ac.at/'.I created the figure by:
m_proj('lambert','longitude',[-34.748 60.8422],'latitude',[26.5861 71.8699]);
m_coast('patch',[1 .85 .7]);
m_pcolor(lon1,lat1,clim);
set(findobj('tag', 'm_pcolor'), 'edgecolor', 'none');
colormap(map);
>> h=colorbar;
>> labels=['ET '; 'BWh'; 'BWk'];
>> h=colorbar;
set(h,'YTickMode','manual','YTick',[1:length(map)]);
set(h,'YTickLabelMode','manual','YTickLabel',labels);
The colors are defined:
m1= [101 255 255]./255;
m5= [255 207 0]./255;
m6= [255 255 101]./255;
I attached the created figure: Map_K_EQ2.jpg. I do not understan why the BWh class is missing in the map and why the lablels do not follow the colors in the colorbar? When I tried to draw these values with same function without defining the colors every values are plotted in the map. This figure is: map_m_eq2.jpg. When I use pcolor I got the same results. Could someone explain me why they do not use every colors in the map?
0 个评论
回答(1 个)
Chad Greene
2015-10-1
This looks like an issue similar to your other question. Your 'Ytick' values are 1:length(map), but I have a feeling they should be explicit values found in your dataset.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!