Answers for "hide ticks without hiding grid"

0

hide ticks without hiding grid

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()
Posted by: Guest on April-27-2022

Python Answers by Framework

Browse Popular Code Answers by Language