Skip to content

how to use self defined colors in add_raster #576

Answered by giswqs
kongdd asked this question in Q&A
Discussion options

You must be logged in to vote

The cmap parameter accepts a matplotlib colormap0 string or a list of hex color codes.

m.add_raster(dem, cmap='OrRd_r', layer_name="DEM")
m.add_raster(dem, cmap=['#ff0000', '#ffff00', '#0000ff'], layer_name="DEM2")

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@kongdd
Comment options

@giswqs
Comment options

@kongdd
Comment options

@giswqs
Comment options

@giswqs
Comment options

Answer selected by giswqs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants