Skip to content

Commit 89b3292

Browse files
author
Heuersv
committed
Handle plots for synthetic and real signal differently
1 parent 2961518 commit 89b3292

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

compression_simulation.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,16 @@ def parse_args():
7979
allow_pickle=True)
8080
# Plot
8181
if args.plot_results:
82-
plt.plot([np.log(res[0]) for res in results], [np.log(res[1]) for res in results],
83-
label='Spline order ' + str(spline_order),
84-
linestyle=(0,(spline_order * 2, 1, 1, 1)))
82+
if cfg.signal == 'synthetic':
83+
# Only show every other plot (too many plots otherwise)
84+
if spline_order in [1,3,5,7,9]:
85+
plt.plot([np.log(res[0]) for res in results], [np.log(res[1]) for res in results],
86+
label='Spline order ' + str(spline_order),
87+
linestyle=(0,(spline_order, 1, 1, 1)))
88+
else:
89+
plt.plot([np.log(res[0]) for res in results], [np.log(res[1]) for res in results],
90+
label='Spline order ' + str(spline_order),
91+
linestyle=(0, (spline_order * 2, 1, 1, 1)))
8592
end_time_splines = time.time()
8693

8794
# Compare times.

0 commit comments

Comments
 (0)