Sous matplotlib il est possible de supprimer les labels des axes en passant par les commandes "ax.set_xticklabels([])" et "ax.set_yticklabels([])", exemple:
#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
x = np.arange(-8,8,0.1)
y = 6.0 / ( 1.0 + np.exp(-0.6*x) )
line, = plt.plot(x, y, '--', linewidth=2)
ax.grid(True)
plt.savefig('RemoveAxesLabels01.png')
plt.show()
sans les labels:
#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
x = np.arange(-8,8,0.1)
y = 6.0 / ( 1.0 + np.exp(-0.6*x) )
line, = plt.plot(x, y, '--', linewidth=2)
ax.grid(True)
ax.set_xticklabels([])
ax.set_yticklabels([])
#plt.ylim(0,7)
#plt.xlabel("How much you have to sweat ?")
#plt.ylabel("Progress")
plt.savefig('RemoveAxesLabels02.png')
plt.show()
Recherches associées
Liens | Site |
---|---|
Remove the x-axis ticks while keeping the grids (matplotlib) | stackoverflow |
Hiding axis text in matplotlib plots | stackoverflow |