I'm using Python 3.4 in macOS. Matplotlib is supposed to support Unicode in labels, but I'm not seeing Emojis rendered properly.
import matplotlib.pyplot as plt
# some code to generate `data` and `labels`...
plt.clf()
plt.scatter(data[:, 0], data[:, 1], c=col)
# disclaimer: labeling taken from example http://stackoverflow.com/questions/5147112/matplotlib-how-to-put-individual-tags-for-a-scatter-plot
for label, x, y in zip(labels, data[:, 0], data[:, 1]):
plt.annotate(
label, # some of these contain Emojis
xy=(x, y), xytext=(-20, 20),
textcoords='offset points', ha='right', va='bottom',
bbox=dict(boxstyle='round,pad=0.5', fc='yellow', alpha=0.5),
arrowprops=dict(arrowstyle = '->', connectionstyle='arc3,rad=0'))
plt.show(False)
A few of the old pre-Unicode Emojis show up in their old style, but the rest (in this example, "fire," "music," and others) don't. Is there a trick to make these appear properly?