0
votes

I'm currently trying to write a piece of code that outputs several different maps. The issue is that when I run this code, each map comes out in different sizes. I was wondering if there is a way I can force my bounding box to be 1500 x 975 pixels in dimension so all my maps are the same size?

### create axis for plotting image ###
my_dpi = 300
fig,ax = plt.subplots(figsize = (1500/my_dpi, 975/my_dpi), dpi=my_dpi)


### setting image within project bounds ###
x1 = bbox[0]
x2 = bbox[2]
y1 = bbox[1]
y2 = bbox[3]


### cropping axis to limits from extent shp ###
ax.set_xlim(xlim)
ax.set_ylim(ylim)