Skip to content

mplleaflet is showing blank when points / features > 1000[Python Notebook] #79

@ashutoshsoni891

Description

@ashutoshsoni891

I have kml file with 1000+ features and I am trying to plot via matplotlib and mplleaflet . When I tried to plot the GeoSeries with 1000+ features it shows blank whereas it works perfect when features < 1000

I am using mplleaflet inside Python Notebook

Here is the code :

import mplleaflet
import maptplotlib.pyplot as plt
import geopandas as gpd

df= gpd.read_file('xyz.kml')

ax_wfs = df['geometry'][:1000].plot(figsize = (15,10) , color = 'black'  )
mplleaflet.display(fig=ax_wfs.figure , tiles='osm' )

I have also tried some stackoverflow hacks like
%%capture
%matplotlib inline
changing alpha value to 0.1

but unfortunately it didnt work at all . @jwass could you please help me out ? This seems like a bug

Thanks in advance!
Ash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions