landscaped figure: spatial_time_difference

This commit is contained in:
Eric Teunis de Boone 2022-08-31 15:20:21 +02:00
parent ad4f117902
commit 2645030538

View file

@ -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