I would not like to have the first label on the y-axis on my figure which looks like this now, since I don’t find it very nice to have it like this.
In my solution, I tried excluding the corresponding (first) tick, however this is not necessary. I just want the label (i.e., 0.3) to diminish.
My try for achieving this goal was the following addition to the script:
y_ticks = ax.get_yticks()
ax.set_yticks(y_ticks[1:])
But I could not solve the problem.
The complete part regarding plotting looks like this
plt.style.use('seaborn-v0_8-bright')
plt.rcParams.update({'font.size': 11, 'font.family': 'serif'})
fig, ax = plt.subplots(figsize=(10, 6))
ax.plot(specific_alpha_degrees, best_X_values, linestyle='-', marker='', label=r'$P_1$', color='blue')
ax.plot(specific_alpha_degrees, best_X_values2, linestyle='--', marker='', label=r'$P_2$', color='green')
ax.plot(specific_alpha_degrees, best_X_values3, linestyle='-.', marker='', label=r'$P_3$', color='red')
ax.plot(specific_alpha_degrees, best_X_values4, linestyle=':', marker='', label=r'$P_4$', color='purple')
ax.plot(specific_alpha_degrees, best_X_values5, linestyle='-', marker='', label=r'$P_5$', color='orange')
y_ticks = ax.get_yticks()
ax.set_yticks(y_ticks[1:])
ax.set_xlabel(r'Incline [$deg$]')
ax.set_ylabel(r'$x_{text{opt}}$')
ax.set_xlim(min(specific_alpha_degrees)-1, max(specific_alpha_degrees)+1)
ax.grid(True, which='major', linestyle='--', linewidth=0.5)
ax.minorticks_on()
ax.legend(loc='center left', bbox_to_anchor=(1, 0.5), fontsize='medium', frameon=False, framealpha=0.9, borderpad=1)
ax.spines['left'].set_position(('data', 0))
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.spines['bottom'].set_color('black')
ax.spines['left'].set_color('black')
fig.tight_layout()
plt.show()