-
I wanted to add colormap for my map in Jupyter notebook. I wanted to know which code I can use. I searched and find this code:get_palette(cmap_name=None, n_class=None, hashtag=False) but when I used, I received an error. I also tried to add colormap based on what you did on 4th lesson named getting started with earth engine image, it changed the color of map. but no colormap is added to my map. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
I want to add this color bar that is in your YouTube tutorial. |
Beta Was this translation helpful? Give feedback.
-
See this example. import ee
import geemap
m = geemap.Map()
dem = ee.Image("USGS/SRTMGL1_003")
vis_params = {
"min": 0,
"max": 4000,
"palette": ["006633", "E5FFCC", "662A00", "D8D8D8", "F5F5F5"],
}
m.add_layer(dem, vis_params, "SRTM DEM")
m.add_colorbar(vis_params, label="Elevation (m)", layer_name="SRTM DEM")
m |
Beta Was this translation helpful? Give feedback.
See this example.