DIGIT = {'MINUS': '-', 'ZERO': '0', 'ONE': '1', 'TWO': '2', 'THREE':
    '3', 'FOUR': '4', 'FIVE': '5', 'SIX': '6', 'SEVEN': '7', 'EIGHT':
    '8', 'NINE': '9', 'STOP': '.'}

def guess(unistr):
    return ''.join([value for u in unistr for key, value in DIGIT.items
        () if key in UD.name(u)])
fig, ax = plt.subplots(1)
ax.plot([-1, 0, 1, 2], list(range(4)))
plt.savefig('/tmp/test.png')
labels = ax.get_xticklabels()
for label in labels:
    label = label.get_text()
print(guess(label))
Conversion of unicode minus sign ( from matplotlib ticklabels )