I have a question about how to add a unit above the colorbar. My code as below:
hc=colorbar;
xlabel(hc,'psi');
However, it reveals that unit is not above the colorbar.
Replace xlabel(hc,'psi')
by title(hc,'psi')
. So the code becomes
hc=colorbar;
title(hc,'psi');
This gives
You can use the code as below
title(colorbar,'psi','FontSize',24);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With