Maps.set_frame(rounded=0, **kwargs)

Set the properties of the map boundary and the background patch.

  • rounded (float, optional) – If provided, use a rectangle with rounded corners as map boundary line. The corners will be rounded with respect to the provided fraction (0=no rounding, 1=max. radius). The default is None.

  • kwargs

    Additional kwargs to style the boundary line (e.g. the spine) and the background patch

    Possible args for the boundary-line:

    • ”edgecolor” or “ec”: The line color

    • ”linewidth” or “lw”: The line width

    • ”linestyle” or “ls”: The line style

    • ”path_effects”: A list of path-effects to apply to the line

    Possible args for the background-patch:

    • ”facecolor” or “fc”: The color of the background patch


>>> m = Maps()
>>> m.add_feature.preset.ocean()
>>> m.set_frame(fc="r", ec="b", lw=3, rounded=.2)
>>> import matplotlib.patheffects as pe
>>> m = Maps()
>>> m.add_feature.preset.ocean(fc="k")
>>> m.set_frame(
>>>     facecolor=(.8, .8, 0, .5), edgecolor="w", linewidth=2,
>>>     rounded=.5,
>>>     path_effects=[pe.withStroke(linewidth=7, foreground="m")])