diff options
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/plot_input.py | 2 | ||||
| -rwxr-xr-x | examples/spectrogram.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/plot_input.py b/examples/plot_input.py index cf325d6..5586038 100755 --- a/examples/plot_input.py +++ b/examples/plot_input.py @@ -100,7 +100,7 @@ try: fig, ax = plt.subplots() lines = ax.plot(plotdata) if len(args.channels) > 1: - ax.legend(['channel {}'.format(c) for c in args.channels], + ax.legend([f'channel {c}' for c in args.channels], loc='lower left', ncol=len(args.channels)) ax.axis((0, len(plotdata), -1, 1)) ax.set_yticks([0]) diff --git a/examples/spectrogram.py b/examples/spectrogram.py index c9ce94e..0ad6a34 100755 --- a/examples/spectrogram.py +++ b/examples/spectrogram.py @@ -66,7 +66,7 @@ for bg, fg in zip(colors, colors[1:]): if char == '\t': bg, fg = fg, bg else: - gradient.append('\x1b[{};{}m{}'.format(fg, bg + 10, char)) + gradient.append(f'\x1b[{fg};{bg + 10}m{char}') try: samplerate = sd.query_devices(args.device, 'input')['default_samplerate'] |
