atompy.textwithbox#

atompy.textwithbox(axes, x, y, text, pad=1.0, boxbackground='white', boxedgecolor='black', boxedgewidth=0.5, **text_kwargs)[source]#

Plot text with matplotlib surrounded by a box using LaTeX commands.

Parameters:
axmatplotlib.axes.Axes

the axes

xfloat

x-position

yfloat

y-position

textstr

The text to be surrounded by the box

padfloat, default: 1.0 (in pts)

padding between boxedge and text

boxbackgroundNone, False, or str, default: "white"

background of box

  • None or False: No background color

  • str: latex xcolor named color

boxedgecolorstr, optional, default: "black"

edge color using named color from latex package xcolor only used if boxbackground != None

boxedgewidthfloat, default 0.5 (in pts)

Linewidth of the box’ edges.

**text_kwargs

Additional matpotlib.text.Text keyword arguments.

Returns:
textmatplotlib.text.Text

The text artist.

Other Parameters:
properties

Other miscellaneous text parameters