how to set xlabels when grid is turned off in matplotlib code example Example: grid off matplotlib plt.grid(b=None)