Thanks for Eric Firing's reply to me.The solution is:
colorbar(im, extend='both', shrink=0.8,format='%0.1f%%',ticks=locator)
The double % in the format string makes it print a single %, and when
given a format string, the format kwarg automatically hands it off to a
FormatStrFormatter.
--
I just want to set [10%,20%] on colorbar. However, failed again and
again. Thank you for your help.
The following code work properly. But when I set formatter =
FixedFormatter([10%,20%,30%,40%])
No labels is shown on colorbar, Why?
Is there any way to set the char % on colorbar?
from