I want to add minor ticks on the y axis. I tried several methods but they all seem to not work. The minor ticks just won't show up. Here is my code.
sns.set_style('whitegrid')
dd.plot(x='Date', y='Min', lw = 4, figsize=(50,30), color = 'red')
plt.grid(color = 'grey')
dd['P05'].plot(lw = 2)
dd['P10'].plot(lw = 2)
dd['P25'].plot(lw = 2)
dd['P50'].plot(lw = 2)
dd['P75'].plot(lw = 2)
dd['P90'].plot(lw = 2)
dd['P95'].plot(lw = 2)
dd['Max'].plot(lw = 4, color = 'black')
plt.xticks(np.arange(0,366, step=31), list(monthDict.values()),\
fontsize = 35, fontname = 'Consolas')
plt.yticks(fontsize = 35)
plt.ylabel('Daily Average Stage (ft NGVD29)', fontsize = 35, \
labelpad = 25,fontname = 'Consolas', color = 'black')
plt.xlabel('') #remove xlabel
plt.legend(prop={'family':'Consolas', 'size':35})
# plt.legend(['5th Pecrentile', '10th percentile', '25th percentile', \
# '50th percentile', '75th percentile', '90th percentile', \
# '95th percentile', '99th percentile'])
plt.title('Cyclic Analysis at {}-H'.format(x),\
fontsize = 55, fontname='Consolas', color = 'black')
ax.minorticks_on()
ax.tick_params(axis='y', which='minor', bottom=False)
I would like to get both the major and minor y ticks at the end of the plot