import matplotlib.pyplot as plt import numpy as np x = np.linspace(0, 2*np.pi, 100) fig = plt.figure() ax = fig.add_subplot(111) ax.plot(x, np.sin(x)) ax.grid(True) ax.set_xticklabels([]) plt.show()