Skip to content

Commit 2e1f047

Browse files
committed
make headings more descriptive
1 parent c692920 commit 2e1f047

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

examples/text_labels_and_annotations/font_family_rc.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
2929
"""
3030

31-
# ##### First example, chooses default sans-serif font:
31+
# Chooses default sans-serif font:
32+
# -----------------------------------------------------
3233

3334
import matplotlib.pyplot as plt
3435

@@ -46,7 +47,8 @@ def print_text(text):
4647

4748
#################################################################
4849
#
49-
# ##### Second example:
50+
# Chose sans-serif font and specify to it to "Nimbus Sans":
51+
# -----------------------------------------------------
5052

5153
plt.rcParams["font.family"] = "sans-serif"
5254
plt.rcParams["font.sans-serif"] = ["Nimbus Sans"]
@@ -55,32 +57,35 @@ def print_text(text):
5557

5658
#################################################################
5759
#
58-
# ##### Third example:
59-
60+
# Chose sans-serif font and specify to it to "Humor Sans":
61+
# -----------------------------------------------------
6062
plt.rcParams["font.family"] = "sans-serif"
6163
plt.rcParams["font.sans-serif"] = ["Humor Sans"]
6264
print_text("Hello World! 03")
6365

6466

6567
##################################################################
66-
# ##### Fourth example, chooses default monospace font:
68+
#
69+
# Chooses default monospace font:
70+
# -----------------------------------------------------
6771

6872
plt.rcParams["font.family"] = "monospace"
6973
print_text("Hello World! 04")
7074

7175

7276
##################################################################
73-
# ##### Fifth example:
74-
77+
#
78+
# Chose monospace font and specify to it to "FreeMono":
79+
# -----------------------------------------------------
7580
plt.rcParams["font.family"] = "monospace"
7681
plt.rcParams["font.monospace"] = ["FreeMono"]
7782
print_text("Hello World! 05")
7883

7984

80-
81-
#############################################################################
85+
##################################################################
8286
#
83-
# ##### Print all available font paths (this is OS specific):
87+
# Print all available font paths (this is OS specific):
88+
# -----------------------------------------------------
8489

8590
import matplotlib.font_manager
8691
fpaths = matplotlib.font_manager.findSystemFonts(fontpaths=None, fontext='ttf')

0 commit comments

Comments
 (0)