Hide axis values in matplotlib

I've this image:

    plt.plot(sim_1['t'],sim_1['V'],'k')
    plt.ylabel('V')
    plt.xlabel('t')
    plt.show()

enter image description here

And I wan't to hide the numbers, if I use

    plt.axis('off')

I get this image:

enter image description here

It also hide the labels, V and t. How can I keep the labels while hiding the values?

If you use the matplotlib object-oriented approach, this is a simple task using ax.set_xticklabels() and ax.set_yticklabels():

    import matplotlib.pyplot as plt

    # Create Figure and Axes instances
    fig,ax = plt.subplots(1)

    # Make your plot, set your axes labels
    ax.plot(sim_1['t'],sim_1['V'],'k')
    ax.set_ylabel('V')
    ax.set_xlabel('t')

    # Turn off tick labels
    ax.set_yticklabels([])
    ax.set_xticklabels([])

    plt.show()

From: stackoverflow.com/q/37039685