From 1264343fa2135164fd3b3d7fb7643017fd112af6 Mon Sep 17 00:00:00 2001 From: Gytis Dudas Date: Wed, 12 Jul 2023 15:25:03 +0300 Subject: [PATCH] Fix indentation of unrooted and circular text functions --- baltic/baltic.py | 108 +++++++++++++++++++++++------------------------ setup.py | 4 +- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/baltic/baltic.py b/baltic/baltic.py index 706f401..f0d4bd3 100644 --- a/baltic/baltic.py +++ b/baltic/baltic.py @@ -792,64 +792,64 @@ def addText(self,ax,target=None,x_attr=None,y_attr=None,text=None,zorder=None,** ax.text(x,y,text(k),zorder=z,**kwargs) return ax -def addTextUnrooted(self,ax,target=None,rotation=None,x_attr=None,y_attr=None,text=None,zorder=None,**kwargs): - if target==None: target=lambda k: k.is_leaf() - if rotation==None: rotation=lambda k: 0.0 - if x_attr==None: x_attr=lambda k: k.x - if y_attr==None: y_attr=lambda k: k.y - if text==None: text=lambda k: k.name - if zorder==None: zorder=4 - - for k in filter(target,self.Objects): - local_kwargs=dict(kwargs) - - x,y=x_attr(k),y_attr(k) - z=zorder - - assert 'tau' in k.traits, 'Branch does not have angle tau computed by drawUnrooted().' - rot=np.rad2deg(k.traits['tau'])%360 - - if 'horizontalalignment' not in local_kwargs: local_kwargs['horizontalalignment']='right' if 90