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

Skip to content

Commit b4a067a

Browse files
dstansbyMeeseeksDev[bot]
authored and
MeeseeksDev[bot]
committed
Backport PR #15499: Do not show path in font table example
1 parent ba518b0 commit b4a067a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)