Error with colorbar if I use hot(6) colourmap.

2 visualizaciones (últimos 30 días)
Szabó-Takács Beáta
Szabó-Takács Beáta el 30 de Jun. de 2016
Comentada: Walter Roberson el 30 de Jun. de 2016
Dear All,
I created a contourfm map using with hot(6) colours by:
worldmap('Europe');
load coast;
plotm(lat, long, 'k');
clear lat long;
contourfm(latitude,longitude,IU2,5);
caxis([1 6])
contourcmap('hot')
I attached the figure. I created a colourbar outside of the map by:
fig1=figure;
axis off
cmap=hot(6);
colormap(cmap)
caxis([1 6])
nTicks = 6;
range = 6 - 1;
inc = range / nTicks;
ticks = ( 0:nTicks ) * inc + 1;
h=colorbar ('location',' Southoutside','XTick',ticks, 'XTickLabel',{ '','40','60','80','100','120'})
h.Limits = [1 6]
h.Label.String='PET (mm/month)'
set(h, 'FontSize',14, 'FontWeight', 'bold');
I attached the colorbar as well. The colours in the map and the colorbar are different instead of the fact that I used hot(6) in both of them. I do not understand why does not exist the first colour on the colorbar?
  1 comentario
Walter Roberson
Walter Roberson el 30 de Jun. de 2016
Your code does not define latitude, longitude, or IU2, so we cannot test your code.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Colormaps en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by