From 2645030538283cacbdf7ecc0e6021f6d225921b0 Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Wed, 31 Aug 2022 15:20:21 +0200 Subject: [PATCH] landscaped figure: spatial_time_difference --- .../src/beacon_spatial_time_difference_setup.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/figures/beacon/src/beacon_spatial_time_difference_setup.py b/figures/beacon/src/beacon_spatial_time_difference_setup.py index 6e6e0db..d459bc5 100755 --- a/figures/beacon/src/beacon_spatial_time_difference_setup.py +++ b/figures/beacon/src/beacon_spatial_time_difference_setup.py @@ -97,9 +97,9 @@ def main(): annot_kwargs = { } - trans_loc = [0.2, 0.9] - ant1_loc = [0.2, 0.4] - ant2_loc = [0.4, 0.2] + trans_loc = [-0.9, 0] + ant1_loc = [0.2, 0] + ant2_loc = [0.3, -0.4] ########################### fig, ax = plt.subplots(1,1,sharex=True, gridspec_kw={'hspace': 0}); @@ -128,8 +128,8 @@ def main(): # Antenna ants = [] annoti_kwargs = [ - dict(text_kw=dict(va='center', ha='left')), - dict(text_kw=dict(ha='left')) + dict(text_kw=dict(va='bottom', ha='left')), + dict(text_kw=dict(va='top', ha='right')) ] for i, loc in enumerate([ant1_loc, ant2_loc], start=1): ants.append( @@ -139,13 +139,13 @@ def main(): ## Distance between Antenna and Transmitter default_annot_kwargs = { } - _annotate_width(ax, f"$t_{i}$", trans_loc, loc, **{**default_annot_kwargs, **annot_kwargs, **annoti_kwargs[i-1]} ) + _annotate_width(ax, f"$d_{i}$", trans_loc, loc, text_dx=(0,0.001), **{**default_annot_kwargs, **annot_kwargs, **annoti_kwargs[i-1]} ) if True: - ax.annotate(f"$A_{i}$", xy=loc, ha='right', va='top') + ax.annotate(f"$A_{i}$", xy=loc, ha='left', va=['bottom', 'top'][i-1]) # Distance between two antennas - _annotate_width(ax, f"$t_d$", ant1_loc, ant2_loc, text_kw=dict(ha='right', va='top')) + _annotate_width(ax, f"$d_{{12}}$", ant1_loc, ant2_loc, text_dx=(0.01,0), text_kw=dict(ha='left', va='top')) return fig, 0