vcs
vcs copied to clipboard
Overwriting option for matplotlib2vcs?
vcs.colors.matplotlib2vcs(cmap, vcs_name=None)
https://uvcdat.llnl.gov/docs/vcs/misc/colors.html
When converting matplotlib colormap to VCS, by default vcs_name
becomes same as the matplotlib colormap, or you can assign your own name. But if the name is already being used as one of original VCS colormap, it assign "_001" at the end of name.
run:
import matplotlib.pyplot as plt
import vcs
cm=vcs.colors.matplotlib2vcs('inferno')
message:
/Users/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/colors.py:38: UserWarning: inferno colormap name was already existing, your colormap name will be: inferno_mpl_000
(vcs_name, vcs_name_final))
run:
cm=vcs.colors.matplotlib2vcs('inferno', vcs_name='inferno')
message:
/Users/lee1043/anaconda2/envs/uvcdat-2.12/lib/python2.7/site-packages/vcs/colors.py:38: UserWarning: inferno colormap name was already existing, your colormap name will be: inferno_mpl_001
(vcs_name, vcs_name_final))
Wondering if we can have "overwrite" option.