You will need a font with the specified Unicode character, STIX fonts must contain a star character. You will need to find or download STIX fonts, of course, any other ttf file with this symbol should be in order.
import matplotlib.pyplot as pyplot from matplotlib.font_manager import FontProperties if __name__ == "__main__": pyplot.figure() prop = FontProperties() prop.set_file('STIXGeneral.ttf') pyplot.xlabel(u"\u2736", fontproperties=prop) pyplot.show()
source share