Skip to content

Commit

Permalink
improve plots
Browse files Browse the repository at this point in the history
  • Loading branch information
ufechner7 committed Nov 23, 2024
1 parent 78c4475 commit 2ab28ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions examples/calc_spectrum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -156,19 +156,13 @@ function plot_spectrum(name)
spectrum = jldopen("data/" * name * ".jld2") do file
read(file, "spectrum")
end
plt.figure("AOA amplitude vs f_ex")
plt.figure(name)
plt.plot(spectrum.f_ex, todb.(spectrum.aoa_eff))
plt.xlabel("f_ex [Hz]")
plt.ylabel("AOA amplitude [dB°]")
plt.gca().set_xscale("log")
plt.grid(true)
end

# plot(F_EX, todb.(AOA_EFF), xlabel="f_ex [Hz]", ylabel="AOA amplitude [dB°]", fig="AOA amplitude vs f_ex")
plt.figure("AOA amplitude vs f_ex")
plt.plot(F_EX, todb.(AOA_EFF))
plt.xlabel("f_ex [Hz]")
plt.ylabel("AOA amplitude [dB°]")
plt.gca().set_xscale("log")
plt.grid(true)
plot_spectrum(spectrum.name)

2 changes: 1 addition & 1 deletion examples/plot_spectrum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ function plot_spectrum(name)
plt.grid(true)
end

plot_spectrum("spectrum_8.0_0.2")
plot_spectrum("spectrum_8.0_0.15")
plot_spectrum("spectrum_8.0_0.0")

0 comments on commit 2ab28ff

Please sign in to comment.