I want to plot this exact plot however I want the labels of the axes not to be centred but on the edges. For example for the y axis on the top and for the x axis on the right. Is this possible in python?
The code generating the plot is the following:
f = plt.figure(figsize=(10, 10))
ax1 = f.add_subplot(211)
# ax1.plot(x_axis, sample.transpose(1,0))
ax1.spines['right'].set_visible(False)
ax1.spines['top'].set_visible(False)
ax1.spines['left'].set_position('center')
ax1.spines['bottom'].set_position('center')
plt.yticks([])
plt.xticks([])
plt.ylabel(r'\textit{f(x)}', fontsize=16)
plt.xlabel(r'\textit{x}', fontsize=16)
plt.rc('text', usetex=True)
plt.rc('font', family='serif')