idk
This commit is contained in:
parent
91f27157dc
commit
22f533db85
@ -114,8 +114,6 @@ def plot_highlighted_integrals(ax, frequency, power, points, nyquist, true_eodf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Plot the power spectrum on the provided axes
|
# Plot the power spectrum on the provided axes
|
||||||
|
|
||||||
|
|
||||||
for point in points:
|
for point in points:
|
||||||
# Identify the category for the current point
|
# Identify the category for the current point
|
||||||
point_category = next((cat for cat, pts in points_categories.items() if point in pts), "Unknown")
|
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
|
# Highlight valid points with a shaded region
|
||||||
ax.axvspan(point - delta, point + delta, color=color, alpha=0.35, label=f'{point_category}')
|
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
|
# Use the category colors for 'Nyquist' and 'EODf' lines
|
||||||
ax.axvline(nyquist, color=category_colors.get("Nyquist", "#2ca02c"), linestyle="--")
|
ax.axvline(nyquist, color=category_colors.get("Nyquist", "#2ca02c"), linestyle="--")
|
||||||
ax.axvline(true_eodf, color=category_colors.get("EODf (awake fish)", "#8c564b"), 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_xlim([0, 1200])
|
||||||
ax.set_ylim([0, 6e-5])
|
ax.set_ylim([0, 6e-5])
|
||||||
ax.set_xlabel('Frequency (Hz)', fontsize=12)
|
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)
|
#ax.set_title('Power Spectrum with highlighted Integrals', fontsize=14)
|
||||||
|
|
||||||
# Apply float formatting to the y-axis
|
# Apply float formatting to the y-axis
|
||||||
|
Loading…
Reference in New Issue
Block a user