Skip to content

Commit

Permalink
xadjust to snp_arrow
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffhsu3 committed Jul 29, 2015
1 parent b5c94c1 commit 01f6867
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions genda/plotting/annotation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@


def snp_arrow(pos, height, snpid, ax, hadjust = 0.0,
def snp_arrow(pos, height, snpid, ax,
hadjust=0.0, xadjust=0.0)
**kwargs):
""" Draws an arrow pointing at a SNP in
a Manhattan plot
Expand All @@ -19,7 +20,7 @@ def snp_arrow(pos, height, snpid, ax, hadjust = 0.0,
p_height = ax.get_ylim()
spacer = (p_height[1] - p_height[0])/rel_width
ax.annotate(snpid, xy=(pos, height),
xytext = (pos, p_height[1] - spacer + hadjust),
xytext = (pos + xadjust, p_height[1] - spacer + hadjust),
arrowprops=dict(facecolor='black', shrink=0.05),
**kwargs)
return ax

0 comments on commit 01f6867

Please sign in to comment.