Skip to content

Commit b984865

Browse files
committed
debugging tip alignment
1 parent 8af8261 commit b984865

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

plot_phylo/amend_tree.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ def auto_axis(ax, textobj, xpos, ypos, width, height, depth, scale_bar,
6767
ax.set_xlim(min(xmin, xmax)-xint, max(xmin, xmax)+xint)
6868
ax.set_ylim(min(ymin, ymax), max(ymin, ymax))
6969
cboxes = get_boxes.get_boxes(ax, textobj)
70-
return (textobj, ax)
70+
ax.set_autoscale_on(False)
71+
return (cboxes, ax)
7172

7273

7374
def draw_scale_bar(ax, width, height, depth, left, bottom,

plot_phylo/plot_phylo.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,6 @@ def plot_phylo(tree, ax,
220220
countD=countD,
221221
dots=dots)
222222

223-
if rev_align_tips:
224-
ps = amend_tree.reverse_align(ax, ps, reverse)
225223
# Hide axis
226224
if not show_axis:
227225
ax.set_axis_off()
@@ -239,10 +237,12 @@ def plot_phylo(tree, ax,
239237
textobj = [p[1] for p in ps]
240238
boxes = get_boxes.get_boxes(ax, textobj)
241239
if auto_ax:
242-
textobj, ax = amend_tree.auto_axis(ax, textobj,
243-
xpos, ypos,
244-
width, height, maxdist,
245-
scale_bar, branch_lengths,
246-
reverse=reverse)
247-
240+
boxes, ax = amend_tree.auto_axis(ax, textobj,
241+
xpos, ypos,
242+
width, height, maxdist,
243+
scale_bar, branch_lengths,
244+
reverse=reverse)
245+
ax.set_autoscale_on(False)
246+
if rev_align_tips:
247+
ps = amend_tree.reverse_align(ax, ps, reverse)
248248
return (boxes)

0 commit comments

Comments
 (0)