Plotting a boxfill with a given graphics method still creates a new graphics method. Why?
Also, when we do not pass our own graphics method, a new gm is created, but we don't know its name so that we can delete it. We should provide a why to access the name of the gm created so that we can deleted after we plot.
@doutriaux1 Do you remember the reason why graphics methods are created in the plot function? We seem to look at the data and modify gm parameters based on that. Is that the motivation behind this? Why not changing the gm that is passed as a parameter than?
>>> import vcs
>>> import cdms2
>>> vcs.download_sample_data_files()
>>> f=cdms2.open(vcs.sample_data+"/clt.nc")
>>> s=f("clt")
>>> x=vcs.init()
>>> gm = vcs.createboxfill('myboxfill')
>>> vcs.elements['boxfill'].keys()
['polar', 'a_lambert_boxfill', 'default', 'a_boxfill', 'a_polar_boxfill', 'a_robinson_boxfill', 'a_mollweide_boxfill', 'myboxfill', 'quick', 'robinson']
>>> x.plot(s, gm)
>>> vcs.elements['boxfill'].keys()
['polar', 'a_lambert_boxfill', 'default', 'a_boxfill', 'a_polar_boxfill', '__boxfill_511997554805793', 'a_robinson_boxfill', 'a_mollweide_boxfill', 'myboxfill', 'quick', 'robinson']
Plotting a boxfill with a given graphics method still creates a new graphics method. Why?
Also, when we do not pass our own graphics method, a new gm is created, but we don't know its name so that we can delete it. We should provide a why to access the name of the gm created so that we can deleted after we plot.
@doutriaux1 Do you remember the reason why graphics methods are created in the plot function? We seem to look at the data and modify gm parameters based on that. Is that the motivation behind this? Why not changing the gm that is passed as a parameter than?
>>> import vcs >>> import cdms2 >>> vcs.download_sample_data_files() >>> f=cdms2.open(vcs.sample_data+"/clt.nc") >>> s=f("clt") >>> x=vcs.init() >>> gm = vcs.createboxfill('myboxfill') >>> vcs.elements['boxfill'].keys() ['polar', 'a_lambert_boxfill', 'default', 'a_boxfill', 'a_polar_boxfill', 'a_robinson_boxfill', 'a_mollweide_boxfill', 'myboxfill', 'quick', 'robinson'] >>> x.plot(s, gm) >>> vcs.elements['boxfill'].keys() ['polar', 'a_lambert_boxfill', 'default', 'a_boxfill', 'a_polar_boxfill', '__boxfill_511997554805793', 'a_robinson_boxfill', 'a_mollweide_boxfill', 'myboxfill', 'quick', 'robinson']