def svg_text(pos, text, font_size=12, align_right=False):
    """Return svg code for text."""
    x, y = pos.astype(int)
    if align_right:
        return (
            '<text text-anchor="end" x="{}" y="{}" font-size="{}">{}</text>'
            .format(x, y, font_size, str(text)))
    else:
        return '<text x="{}" y="{}" font-size="{}">{}</text>'.format(x, y,
            font_size, str(text))
