@@ -62,40 +62,41 @@ def doall():
6262 mpl_grey_rvb = (51. / 255. , 51. / 255. , 51. / 255. )
6363
6464 # 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 ([])
7374
7475 # Gap between lines in axes coords
7576 line_axesfrac = 1 / n_lines
7677
7778 # Plotting header demonstration formula
7879 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 )
8283
8384 # Plotting features demonstration formulae
8485 for i_line in range (1 , n_lines ):
8586 baseline = 1 - i_line * line_axesfrac
8687 baseline_next = baseline - line_axesfrac
8788 title = mathtext_titles [i_line ] + ":"
8889 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' )
9596 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 )
99100
100101 for i in range (n_lines ):
101102 s = mathext_demos [i ]
0 commit comments