matplotlib remove ticks and lines 1

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()

Here is what the above code is Doing:
1. Create a figure
2. Add a subplot to the figure
3. Plot a line on the subplot
4. Remove the ticks from the subplot
5. Show the figure

Similar Posts