8000 Do not show path in font table example · matplotlib/matplotlib@6366619 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6366619

Browse files
committed
Do not show path in font table example
1 parent 349e2e9 commit 6366619

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)
0