@@ -62,40 +62,41 @@ def doall():
62
62
mpl_grey_rvb = (51. / 255. , 51. / 255. , 51. / 255. )
63
63
64
64
# Creating figure and axis.
65
- plt .figure (figsize = (6 , 7 ))
66
- plt .axes ([0.01 , 0.01 , 0.98 , 0.90 ], facecolor = "white" , frameon = True )
67
- plt .gca ().set_xlim (0. , 1. )
68
- plt .gca ().set_ylim (0. , 1. )
69
- plt .gca ().set_title ("Matplotlib's math rendering engine" ,
70
- color = mpl_grey_rvb , fontsize = 14 , weight = 'bold' )
71
- plt .gca ().set_xticklabels ([])
72
- plt .gca ().set_yticklabels ([])
65
+ fig = plt .figure (figsize = (6 , 7 ))
66
+ ax = fig .add_axes ([0.01 , 0.01 , 0.98 , 0.90 ],
67
+ facecolor = "white" , frameon = True )
68
+ ax .set_xlim (0 , 1 )
69
+ ax .set_ylim (0 , 1 )
70
+ ax .set_title ("Matplotlib's math rendering engine" ,
71
+ color = mpl_grey_rvb , fontsize = 14 , weight = 'bold' )
72
+ ax .set_xticklabels ([])
73
+ ax .set_yticklabels ([])
73
74
74
75
# Gap between lines in axes coords
75
76
line_axesfrac = 1 / n_lines
76
77
77
78
# Plotting header demonstration formula
78
79
full_demo = mathext_demos [0 ]
79
- plt .annotate (full_demo ,
80
- xy = (0.5 , 1. - 0.59 * line_axesfrac ),
81
- color = mpl_orange_rvb , ha = 'center' , fontsize = 20 )
80
+ ax .annotate (full_demo ,
81
+ xy = (0.5 , 1. - 0.59 * line_axesfrac ),
82
+ color = mpl_orange_rvb , ha = 'center' , fontsize = 20 )
82
83
83
84
# Plotting features demonstration formulae
84
85
for i_line in range (1 , n_lines ):
85
86
baseline = 1 - i_line * line_axesfrac
86
87
baseline_next = baseline - line_axesfrac
87
88
title = mathtext_titles [i_line ] + ":"
88
89
fill_color = ['white' , mpl_blue_rvb ][i_line % 2 ]
89
- plt .fill_between ([0. , 1. ], [baseline , baseline ],
90
- [baseline_next , baseline_next ],
91
- color = fill_color , alpha = 0.5 )
92
- plt .annotate (title ,
93
- xy = (0.07 , baseline - 0.3 * line_axesfrac ),
94
- color = mpl_grey_rvb , weight = 'bold' )
90
+ ax .fill_between ([0 , 1 ], [baseline , baseline ],
91
+ [baseline_next , baseline_next ],
92
+ color = fill_color , alpha = 0.5 )
93
+ ax .annotate (title ,
94
+ xy = (0.07 , baseline - 0.3 * line_axesfrac ),
95
+ color = mpl_grey_rvb , weight = 'bold' )
95
96
demo = mathext_demos [i_line ]
96
- plt .annotate (demo ,
97
- xy = (0.05 , baseline - 0.75 * line_axesfrac ),
98
- color = mpl_grey_rvb , fontsize = 16 )
97
+ ax .annotate (demo ,
98
+ xy = (0.05 , baseline - 0.75 * line_axesfrac ),
99
+ color = mpl_grey_rvb , fontsize = 16 )
99
100
100
101
for i in range (n_lines ):
101
102
s = mathext_demos [i ]
0 commit comments