CDAT / cdat

Community Data Analysis Tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Boxfill does not follow levels

lee1043 opened this issue · comments

While I was able to adjust color levels for isofill, I was not able to do this with the boxfill.

import cdms2, vcs

infile='clt.nc'
f=cdms2.open(infile)
d=f('clt')

x=vcs.init()
box=x.createboxfill()
x.plot(d)

test1

box.levels=[0, 90]  ## This usage is mismatching to usage information given from https://uvcdat.llnl.gov/documentation/vcs/vcs-5.html
x.clear()
x.plot(d,box)

test2

No change on color bar regarding setting box.levels

@lee1043 this is because boxfill acts a little differently, please see tutorial at: https://uvcdat.llnl.gov/iPython/boxfill/boxfill.html

Basically in order to have boxfill behave like a isofill use:

box.boxfill_type = 'custom'

otherwise you have to use color1 / color2 and level1 / level2

@lee1043, in the future, you might also want to report vcs bugs on the vcs repo issue tracker.