Setting layer blending as additive with opacity in Kepler GL for Python

by guyts   Last Updated July 11, 2019 19:22 PM

I'm using KeplerGL in python (in a Jupyter notebook) to plot polygons on a map with different layers. After setting the layers, I've tried to find where can I edit their opacity when adding them up, but can't seem to find this option.

Also, tried to look for that in the map_1.config but couldn't spot it there either.

import geopandas as gpd
from keplergl import KeplerGl 

from keplergl import KeplerGl 
map_1 = KeplerGl(height=500)
map_1.add_data(data=df, name=”data_1”)

EDIT: in fact, I found the opacity field in the config json, but it seems like it's not editable.


gives 0.8. But when I am trying to reassign:

map_1.config['config']['visState']['layers'][0]['config']['visConfig']['opacity'] = 0.25

It doesn't change the value and returns 0.8 again.

Tags : python layers

Related Questions

Updated April 24, 2015 23:09 PM

Updated May 13, 2015 18:09 PM

Updated September 28, 2017 20:22 PM

Updated February 15, 2018 21:22 PM

Updated March 11, 2017 14:22 PM