File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 8
8
import matplotlib .pyplot as plt
9
9
plt .rcParams .update ({
10
10
"font.family" : "serif" ,
11
- "font.serif" : [], # use latex default serif font
12
- "font.sans-serif" : ["DejaVu Sans" ], # use a specific sans-serif font
11
+ # Use LaTeX default serif font.
12
+ "font.serif" : [],
13
+ # Use specific cursive fonts.
14
+ "font.cursive" : ["Comic Neue" , "Comic Sans MS" ],
13
15
})
14
16
15
17
fig , ax = plt .subplots (figsize = (4.5 , 2.5 ))
18
20
19
21
ax .text (0.5 , 3. , "serif" )
20
22
ax .text (0.5 , 2. , "monospace" , family = "monospace" )
21
- ax .text (2.5 , 2. , "sans-serif" , family = "sans-serif" )
22
- ax .text (2.5 , 1. , "comic sans " , family = "Comic Sans MS " )
23
+ ax .text (2.5 , 2. , "sans-serif" , family = "DejaVu Sans" ) # Use specific sans font.
24
+ ax .text (2.5 , 1. , "comic" , family = "cursive " )
23
25
ax .set_xlabel ("µ is not $\\ mu$" )
24
26
25
27
fig .tight_layout (pad = .5 )
You can’t perform that action at this time.
0 commit comments