colorbar label along y-axis instead of x-axis
Hello! I would like the colorbar label to appear directly underneath the colorbar (right underneath the "220" in the figure below), horizontal along the x axis. However, when I specify this as follows, it aligns the label along the y axis.
Here is the relevant code:
contourf(lon,lat,tmp2, 25, ‘LineStyle’,’none’);
hold on
colormap(‘turbo’)
set(gca,’fontsize’,14);
ylabel(‘Latitude (circ)’)
xlabel(‘Longitude (circ)’)
h = colorbar;
xlabel(h,'(K)’);
hold off
——
can someone help me change the orientation of that ‘(K)’, and show me how to adjust my code in general so I can make this adjustments in other plots as well? Thanks.Hello! I would like the colorbar label to appear directly underneath the colorbar (right underneath the "220" in the figure below), horizontal along the x axis. However, when I specify this as follows, it aligns the label along the y axis.
Here is the relevant code:
contourf(lon,lat,tmp2, 25, ‘LineStyle’,’none’);
hold on
colormap(‘turbo’)
set(gca,’fontsize’,14);
ylabel(‘Latitude (circ)’)
xlabel(‘Longitude (circ)’)
h = colorbar;
xlabel(h,'(K)’);
hold off
——
can someone help me change the orientation of that ‘(K)’, and show me how to adjust my code in general so I can make this adjustments in other plots as well? Thanks. Hello! I would like the colorbar label to appear directly underneath the colorbar (right underneath the "220" in the figure below), horizontal along the x axis. However, when I specify this as follows, it aligns the label along the y axis.
Here is the relevant code:
contourf(lon,lat,tmp2, 25, ‘LineStyle’,’none’);
hold on
colormap(‘turbo’)
set(gca,’fontsize’,14);
ylabel(‘Latitude (circ)’)
xlabel(‘Longitude (circ)’)
h = colorbar;
xlabel(h,'(K)’);
hold off
——
can someone help me change the orientation of that ‘(K)’, and show me how to adjust my code in general so I can make this adjustments in other plots as well? Thanks. xlabel colorbar, colorbar orientation, colorbar, ylabel colorbar MATLAB Answers — New Questions