2626
2727.. redirect-from:: /examples/font_family_rc_sgskip
2828
29- ###### First example, chooses default sans-serif font:
3029"""
3130
31+ # ##### First example, chooses default sans-serif font:
32+
3233import matplotlib .pyplot as plt
3334
3435
@@ -45,7 +46,7 @@ def print_text(text):
4546
4647#################################################################
4748#
48- ###### Second example:
49+ # ##### Second example:
4950
5051plt .rcParams ["font.family" ] = "sans-serif"
5152plt .rcParams ["font.sans-serif" ] = ["Nimbus Sans" ]
@@ -54,22 +55,22 @@ def print_text(text):
5455
5556#################################################################
5657#
57- ###### Third example:
58+ # ##### Third example:
5859
5960plt .rcParams ["font.family" ] = "sans-serif"
6061plt .rcParams ["font.sans-serif" ] = ["Humor Sans" ]
6162print_text ("Hello World! 03" )
6263
6364
6465##################################################################
65- ###### Fourth example, chooses default monospace font:
66+ # ##### Fourth example, chooses default monospace font:
6667
6768plt .rcParams ["font.family" ] = "monospace"
6869print_text ("Hello World! 04" )
6970
7071
7172##################################################################
72- ###### Fifth example:
73+ # ##### Fifth example:
7374
7475plt .rcParams ["font.family" ] = "monospace"
7576plt .rcParams ["font.monospace" ] = ["FreeMono" ]
@@ -79,7 +80,7 @@ def print_text(text):
7980
8081#############################################################################
8182#
82- ###### Print all available font paths (this is OS specific):
83+ # ##### Print all available font paths (this is OS specific):
8384
8485import matplotlib .font_manager
8586fpaths = matplotlib .font_manager .findSystemFonts (fontpaths = None , fontext = 'ttf' )
0 commit comments