Skip to content

Unable to set more than one font in legends, impossible to label data with Glyph from multiple languages. #15260

Closed
@mvarnold

Description

@mvarnold

Bug report

Bug summary

It is impossible to set more than one font in a legend making it impossible to label data in different languages, such as chinese, arabic and emojis, in the same legend. Allowing prop to accept lists of dictionaries would solve this issue.

Code for reproduction

import matplotlib.pyplot as plt

f, axs = plt.subplots()
plt.plot([i for i in range(5)], label=u"#방탄소년단")
plt.plot([i for i in range(6)], label=u"#🔥")
plt.legend()
plt.show()

Actual outcome
image

Expected outcome

While it would be nice if matplotlib searched for fonts with support for unicode characters, simply allowing lists of fonts to be specified for each handle label, rather than enforcing using one font.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions