Why pcolor and m_pcolor do not use every colors in the figure?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Chad Greene
el 1 de Oct. de 2015
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 comentarios
Ver también
Categorías
Más información sobre Colorbar en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!