commit e9efbe5d56f114ee6e19fcdebbbb093745e664ba
parent e98dac21a5a401b5174ce493784bc1cedd8f5350
Author: Martin Kloeckner <mjkloeckner@gmail.com>
Date: Mon, 15 Sep 2025 00:40:21 -0300
set legend to 'upper left'
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tp/utils.py b/tp/utils.py
@@ -55,7 +55,7 @@ def graph_multiple_data(x, y_arr, y_lab, t=0, dt=0, a=0, da=0, show=True):
axis.axvspan(a, a+da, color='skyblue',
alpha=0 if a == 0 else 0.50,
label=f"Un periodo T={da}s" if da != 0 else "")
- axis.legend()
+ axis.legend(loc='upper left')
if show:
plt.show()
@@ -87,7 +87,7 @@ def graph_data(x, y, t=0, dt=0, a=0, da=0, show=True):
plt.tight_layout()
- # max 3 decimals
+ # max 3 decimales
axis.xaxis.set_major_formatter(FuncFormatter(ticks_label_format))
axis.set_xlim([t, t+dt if dt > 0 else x[-1]])
@@ -97,7 +97,7 @@ def graph_data(x, y, t=0, dt=0, a=0, da=0, show=True):
axis.axvspan(a, a+da, color='skyblue',
alpha=0 if a == 0 else 0.50,
label=f"Un periodo T={da}s" if da != 0 else "")
- axis.legend()
+ axis.legend(loc='upper left')
if show:
plt.show()