Matplotlib projection remove margin

后端 未结 1 1299
甜味超标
甜味超标 2021-01-24 21:15

Here\'s an image of US counties, created on top of

ax = plt.axes(projection=ccrs.LambertConformal())
ax.set_extent([-120, -70, 20, 50], ccrs.Geodetic())
<         


        
1条回答
  •  不知归路
    2021-01-24 21:58

    You can use subplots_adjust:

    To remove all the whitespace from around the Axes object, use:

    fig.subplots_adjust(left=0, right=1, bottom=0, top=1)
    

    Setting the extent is changing the data limits, not the position/size of the Axes.

    0 讨论(0)
提交回复
热议问题