You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example from the documentation of cartoee gives an error when adding cmap for the colorbar (but works when using custom palette)
# get an earth engine image
srtm = ee.Image("CGIAR/SRTM90_V4")
# vis
visualization = {'min':-500,'max':3000,'bands':'elevation'}
bbox = [-180,-90,180,90]
# plot the map
ax = cee.getMap(srtm,cmap='terrain',
region=bbox,
visParams=visualization,
dims=1000)
# add a color bar using cartoee
cb = cee.addColorbar(ax,loc='right',
cmap='terrain',
visParams=visualization)
ax.coastlines()
This example from the documentation of cartoee gives an error when adding cmap for the colorbar (but works when using custom palette)
TypeError Traceback (most recent call last)
in ()
14 cb = cee.addColorbar(ax,loc='right',
15 cmap='terrain',
---> 16 visParams=visualization)
17
18 ax.coastlines()
2 frames
/usr/local/lib/python3.7/dist-packages/matplotlib/cbook/init.py in _check_isinstance(_types, **kwargs)
2126 ", ".join(names[:-1]) + " or " + names[-1]
2127 if len(names) > 1 else names[0],
-> 2128 type_name(type(v))))
2129
2130
TypeError: 'cmap' must be an instance of matplotlib.colors.Colormap or None, not a str
The text was updated successfully, but these errors were encountered: