Skip to main content

All Questions

Filter by
Sorted by
Tagged with
4 votes
1 answer
189 views

How to overlap a geopandas dataframe with basemap?

I have a shapefile that I read as a geopandas dataframe import geopandas as gpd gdf = gpd.read_file('myfile.shp') gdf.plot() where gdf.crs <Projected CRS: ESRI:54009> Name: World_Mollweide Axis ...
emax's user avatar
  • 7,235
0 votes
1 answer
1k views

Add U.S. State Borders to plot

Can someone tell me how to modify the script below to add U.S. state borders using Geopandas? I have tried but can't seem to get it to work. Also, if there is a particular state border shapefile that ...
bayouwxman's user avatar
0 votes
1 answer
636 views

How to force geopandas to plot a map with "missing values" (legend) in a columns without "missing values"?

I want to make some maps (each column is a date), and for some columns (aka dates) there are some missing values, and for others are not. When I used the function within geopandas "missing_kwds&...
Mohamed Hachaichi's user avatar
1 vote
1 answer
2k views

How do you display the scale in meters, the north arrow and the axes in latitude and longitude on a map with Geopandas?

With reference to this issue, is it possible to have the scale bar (projected in meters, so 3857 for example) with the x,y axes in latitude, longitude projection (4326) and the north arrow? I don't ...
Tim's user avatar
  • 563
4 votes
2 answers
39k views

How to use geopandas to plot latitude and longitude on a more detailed map with by using basemaps?

I am trying to plot some latitude and longitudes on the map of delhi which I am able to do by using a shape file in python3.8 using geopandas Here is the link for the shape file: https://drive.google....
gm1312's user avatar
  • 99
0 votes
1 answer
3k views

How to create a scalebar using cartopy and matplotlib?

in respect to the previous examples in stackoverflow, I searched for other alternatives in order to create a scalebar. In my research, I verified that the Basemap class from mpl_toolkits.basemap see ...
Philipe Riskalla Leal's user avatar
3 votes
1 answer
2k views

Avoid overlaping labels at matplotlib + geopandas

I´ve found many examples on how to avoid overlaping text on matplotlib but none that I could figure out how to apply to my case. I have a dataframe (mapadf1) with some information about brazilian ...
jvqp's user avatar
  • 269
0 votes
0 answers
416 views

How can I show the legends on a shapefile plot made using matplotlib?

f, ax = plt.subplots(1, figsize=(10, 10)) segdat.plot(ax = ax) ax.grid(False) But I want to have the attribute seg_id2 displayed ON the plot. The idea is to visually identify which segment ID on the ...
ferengi's user avatar
  • 477
2 votes
1 answer
1k views

How can I get a colorbar for a shapefile imported as geopandas dataframe and plotted in matplotlib?

I have a shapefile that is imported as a geopandas dataframe, one of whose attributes I plot this way: fig, ax = plt.subplots(1, figsize=(15, 15)) polydat.plot(ax = ax, column = 'pptrate', cmap=...
maximusdooku's user avatar
  • 5,502