Skip to content

Commit

Permalink
markup ks
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed May 11, 2024
1 parent 06ef3fe commit 193e20d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jcvi/graphics/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,15 +708,15 @@ def draw_cmap(ax, cmap_text, vmin, vmax, cmap=None, reverse=False):
ax.text(x, ymin - 0.005, "%.1f" % v, ha="center", va="top", size=10)


def write_messages(ax, messages, ypad=0.04):
def write_messages(ax, messages: List[str], ypad: float=0.04):
"""
Write text on canvas, usually on the top right corner.
"""
tc = "gray"
axt = ax.transAxes
yy = 0.95
for msg in messages:
ax.text(0.95, yy, msg, color=tc, transform=axt, ha="right")
ax.text(0.95, yy, markup(msg), color=tc, transform=axt, ha="right")
yy -= ypad


Expand Down

0 comments on commit 193e20d

Please sign in to comment.