Skip to content

ticks in color bar #80

@rabiulawaldu

Description

@rabiulawaldu

I have customized the levels for the color bar in my code. According to the code, the color bar is supposed to display the tick labelled: -3.5, -2.5, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2.5, and 3.5. However, the figure does not display the specified ticks on the color bar as expected. I have attached a copy of the code along with the figure. I would appreciate it if you could help me understand why this is happening and how to fix it.

r=cf.read(dwp+'praw_mon_OBS_*.nc')[0]
cmix=[-3.5,-2.5,-1.5,-1,-0.5,0,0.5,1,1.5,2.5,3.5];
cti='regression slope (mm day$^{-1}$ PW$^{-1}$)'
cfp.cscale('scale1',ncols=len(cmix)+1, white=[5,6], reverse=True)
cfp.levs(manual=cmix)
cfp.con(r,lines=False,colorbar_title=cti,colorbar_label_skip=None)

cbar_lev

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions