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 a
You problem here is that the default font have no good support for emojis.
In plt.annotate
function, you can add a parameter fontname
to specify the typeface that has a good support for emojis.
Following code are what I got on my Windows machine with some edits to your code, it seems that "Segoe UI Emoji" has been installed on my computer already.
# this line is for jupyter notebook
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
# config the figure for bigger and higher resolution
plt.rcParams["figure.figsize"] = [12.0, 8.0]
plt.rcParams['figure.dpi'] = 300
data = np.random.randn(7, 2)
plt.scatter(data[:, 0], data[:, 1])
labels = '