I have trouble printing a map in Austrian Lambert projection. I use matplotlib and geoplot. It all works fine as long as the shapefile has WGS84 (epsg=4326), or if not is set to these CRS (using file.to_crs(epsg=4326)). If not, I get an empty picture. I want to print a shapefile that actually is in Lambert projection in this projection. Here the examples: What I want: enter image description here

What I get: enter image description here

Here is my code:

fig, ax = plt.subplots(1, figsize=Myfigsize)
    grow_zones, ax=ax, facecolor="red", edgecolor="black", linewidth=0.5)

fig = plt.gcf()



How can I get the picture in its own projection?

1 Answer 1


Assuming this is projection you meant: EPSG: 31287, (https://epsg.io/31287), then that particular projection is actually not compatible with geoplot.

As discussed here, geoplot relies on Cartopy's projection list, listed here: https://scitools.org.uk/cartopy/docs/v0.15/crs/projections.html#

The specific projection you want is not listed. Defining a projection outside this list (e.g. using Proj4) is currently not possible. However, you can try and experiment with the other projections that may be close to the one you are attempting to see. To do that, this is the code snippet you can implement prior to creating the figures (and adjusting the projection parameter accordingly):

import geoplot.crs as gcrs
gplt.polyplot(grow_zones, projection=gcrs.LambertConformal()) #for example

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.