Answers for "plt remove ticks"

0

matplotlib remove ticks and lines

fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot([1],[1])
ax.tick_params(axis=u'both', which=u'both',length=0)
plt.show()
Posted by: Guest on April-07-2020
-1

plt hide axis ticks

pythonCopyimport matplotlib.pyplot as plt

plt.plot([0, 10], [0, 10])
plt.xlabel("X Label")
plt.ylabel("Y Label")

ax = plt.gca()
ax.axes.xaxis.set_visible(False)
ax.axes.yaxis.set_visible(False)

plt.grid(True)
plt.show()
Posted by: Guest on August-06-2020

Python Answers by Framework

Browse Popular Code Answers by Language