60 colormaps
Uncomment the following line to install geemap if needed.
In [ ]:
Copied!
# !pip install geemap
# !pip install geemap
In [ ]:
Copied!
import ee
import geemap
import geemap.colormaps as cm
import ee
import geemap
import geemap.colormaps as cm
In [ ]:
Copied!
# geemap.update_package()
# geemap.update_package()
In [ ]:
Copied!
cm.palettes.dem
cm.palettes.dem
In [ ]:
Copied!
cm.palettes.ndvi
cm.palettes.ndvi
In [ ]:
Copied!
cm.palettes.ndwi
cm.palettes.ndwi
In [ ]:
Copied!
cm.get_palette('terrain', n_class=8)
cm.get_palette('terrain', n_class=8)
In [ ]:
Copied!
cm.plot_colormap('terrain', width=8.0, height=0.4, orientation='horizontal')
cm.plot_colormap('terrain', width=8.0, height=0.4, orientation='horizontal')
In [ ]:
Copied!
Map = geemap.Map()
palette = cm.palettes.dem
# palette = cm.palettes.terrain
dem = ee.Image('USGS/SRTMGL1_003')
vis_params = {'min': 0, 'max': 4000, 'palette': palette}
Map.addLayer(dem, vis_params, 'SRTM DEM')
Map.add_colorbar(vis_params, label="Elevation (m)", layer_name="SRTM DEM", font_size=9)
Map
Map = geemap.Map()
palette = cm.palettes.dem
# palette = cm.palettes.terrain
dem = ee.Image('USGS/SRTMGL1_003')
vis_params = {'min': 0, 'max': 4000, 'palette': palette}
Map.addLayer(dem, vis_params, 'SRTM DEM')
Map.add_colorbar(vis_params, label="Elevation (m)", layer_name="SRTM DEM", font_size=9)
Map
In [ ]:
Copied!
Map.add_colorbar(
vis_params, label="Elevation (m)", orientation="vertical", layer_name="SRTM DEM"
)
Map.add_colorbar(
vis_params, label="Elevation (m)", orientation="vertical", layer_name="SRTM DEM"
)
In [ ]:
Copied!
Map.add_colorbar(
vis_params,
label="Elevation (m)",
orientation="vertical",
layer_name="SRTM DEM",
transparent_bg=True,
)
Map.add_colorbar(
vis_params,
label="Elevation (m)",
orientation="vertical",
layer_name="SRTM DEM",
transparent_bg=True,
)
In [ ]:
Copied!
Map.add_colorbar(
vis_params,
discrete=True,
label="Elevation (m)",
orientation="vertical",
layer_name="SRTM DEM",
)
Map.add_colorbar(
vis_params,
discrete=True,
label="Elevation (m)",
orientation="vertical",
layer_name="SRTM DEM",
)
In [ ]:
Copied!
# cm.list_colormaps()
# cm.list_colormaps()
In [ ]:
Copied!
cm.plot_colormaps(width=12, height=0.4)
cm.plot_colormaps(width=12, height=0.4)
Last update:
2023-04-06
Created: 2020-03-31
Created: 2020-03-31