ResidentMario / geoplot

High-level geospatial data visualization library for Python.
https://residentmario.github.io/geoplot/index.html
MIT License
1.14k stars 95 forks source link

Sanskey does not accept `linestyle` argument #295

Open ozak opened 3 months ago

ozak commented 3 months ago

According to the documentation, one should be able to set the linestyle in sanskey, but it generates an error. E.g., when running

import geopandas as gpd
import geoplot as gplt
import geoplot.crs as gcrs
import matplotlib.pyplot as plt

dc_roads = gpd.read_file(gplt.datasets.get_path('dc_roads'))

gplt.sankey(dc_roads,             
            projection=gcrs.AlbersEqualArea(),            
            color='black',
            linestyle='-.'
)
plt.title("Streets in Washington DC by Average Daily Traffic, 2015")

I get

image

I also tried using the kwargs dictionary as suggested in the docs/help, but still get an error:

gplt.sankey(dc_roads,             
            projection=gcrs.AlbersEqualArea(),            
            color='black',
            kwargs={'linestyle':'-.'}
)
image

Did I misunderstand the documentation or is there something wrong? Any help would be appreciated.