diff --git a/code/plot_functions.py b/code/plot_functions.py index 4850e1e..4cd4776 100644 --- a/code/plot_functions.py +++ b/code/plot_functions.py @@ -114,8 +114,6 @@ def plot_highlighted_integrals(ax, frequency, power, points, nyquist, true_eodf, } # Plot the power spectrum on the provided axes - - for point in points: # Identify the category for the current point point_category = next((cat for cat, pts in points_categories.items() if point in pts), "Unknown") @@ -131,7 +129,7 @@ def plot_highlighted_integrals(ax, frequency, power, points, nyquist, true_eodf, # Highlight valid points with a shaded region ax.axvspan(point - delta, point + delta, color=color, alpha=0.35, label=f'{point_category}') - ax.plot(frequency, power) + ax.plot(frequency, power, color="#1f77b4", linewidth=1.5) # Use the category colors for 'Nyquist' and 'EODf' lines ax.axvline(nyquist, color=category_colors.get("Nyquist", "#2ca02c"), linestyle="--") ax.axvline(true_eodf, color=category_colors.get("EODf (awake fish)", "#8c564b"), linestyle="--") @@ -140,7 +138,7 @@ def plot_highlighted_integrals(ax, frequency, power, points, nyquist, true_eodf, ax.set_xlim([0, 1200]) ax.set_ylim([0, 6e-5]) ax.set_xlabel('Frequency (Hz)', fontsize=12) - ax.set_ylabel(r'Power [$\frac{\mathrm{mV^2}}{\mathrm{Hz}}$]', fontsize=12) + ax.set_ylabel(r'Power [$\frac{\mathrm{Hz^2}}{\mathrm{Hz}}$]', fontsize=12) #ax.set_title('Power Spectrum with highlighted Integrals', fontsize=14) # Apply float formatting to the y-axis