I'm trying to produce a stacked set of waveform plots to include in a paper, and my desired font is Helvetica, which is applied to the x-axis values and labels but not to the y-axis values. An additional issue I'm having is the repeated x-axis labels, as I only wish to have time
labelled on the bottom plot. Here is my code:
from matplotlib import rc
import matplotlib.pyplot as plt
rc('font', **{'family': 'sans-serif', 'sans-serif': ['Helvetica']})
rc('text', usetex=True)
ref, sr = librosa.load(r"C:\Users\...\ref_4_dry.wav", mono=False, duration=10, sr=44100)
wn, sr = librosa.load(r"C:\Users\...\wn_4_dry.wav", mono=False, duration=10, sr=44100)
mwn, sr = librosa.load(r"C:\Users\...\mwn_4_dry.wav", mono=False, duration=10, sr=44100)
fig, ax = plt.subplots(nrows=3, sharex=True, figsize=(15, 15))
librosa.display.waveshow(ref, sr=sr, ax=ax[0])
librosa.display.waveshow(wn, sr=sr, ax=ax[1])
librosa.display.waveshow(mwn, sr=sr, ax=ax[2])
Here is an image of the issue I'm having (the y-axis font seems to be reverting to Computer Modern or some other standard font):