Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e78a098

Browse files
authored
Merge pull request #15524 from meeseeksmachine/auto-backport-of-pr-15499-on-v3.2.x
Backport PR #15499 on branch v3.2.x (Do not show path in font table example)
2 parents a22443f + b4a067a commit e78a098

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

examples/text_labels_and_annotations/font_table.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
python font_table.py /path/to/font/file
1515
"""
1616

17+
import os
1718
import unicodedata
1819

1920
import matplotlib.font_manager as fm
@@ -84,7 +85,7 @@ def draw_font_table(path):
8485
chars[row][col] = chr(char_code)
8586

8687
fig, ax = plt.subplots(figsize=(8, 4))
87-
ax.set_title(path)
88+
ax.set_title(os.path.basename(path))
8889
ax.set_axis_off()
8990

9091
table = ax.table(

0 commit comments

Comments
 (0)