pygmt.params.Box
- class pygmt.params.Box(clearance=None, fill=None, inner_gap=None, inner_pen=None, pen=None, radius=False, shade_offset=None, shade_fill=None)[source]
 Class for specifying the box around GMT embellishments.
- Parameters:
 clearance (
float|str|Sequence[float|str] |None, default:None) –Set clearances between the embellishment and the box border. It can be either a scalar value or a sequence of two/four values.
a scalar value means a uniform clearance in all four directions.
a sequence of two values means separate clearances in x- and y-directions.
a sequence of four values means separate clearances for left/right/bottom/top.
fill (
str|None, default:None) – Fill for the box [Default is no fill].inner_gap (
float|str|None, default:None) – Gap between the outer and inner borders [Default is"2p"].inner_pen (
str|None, default:None) – Pen attributes for the inner border [Default to MAP_DEFAULT_PEN].pen (
str|None, default:None) – Pen attributes for the box outline.radius (
str|bool, default:False) – Draw a rounded rectangular border instead of sharp. Passing a value with unit to control the corner radius [Default is"6p"].shade_offset (
Sequence[float|str] |None, default:None) – Place an offset background shaded region behind the box. A sequence of two values (dx, dy) indicates the shift relative to the foreground frame [Default is("4p", "-4p")].shade_fill (
str|None, default:None) – Fill for the shaded region [Default is"gray50"].
Examples
>>> import pygmt >>> from pygmt.params import Box >>> fig = pygmt.Figure() >>> fig.logo(box=Box(pen="1p", radius="5p", shade_offset=("5p", "5p"))) >>> fig.show()
Attributes