Skip to content

aspect ratio requires draw for cartopy maps #60

@mathause

Description

@mathause

The following leads to a wrong figure size:

f, axs = plt.subplots(2, 1, subplot_kw=dict(projection=ccrs.Robinson()))
f.subplots_adjust(hspace=0, wspace=0, top=1, bottom=0, left=0, right=1)
mpu.set_map_layout(axs, width=17)  # width is in cm
print("Size (w x h):  ", np.round(f.get_size_inches() * 2.54, 2))

cartopy maps seem to require a f.canvas.draw() command

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions