66from numpy .testing import assert_almost_equal
77import pytest
88
9- import matplotlib
109import matplotlib as mpl
1110from matplotlib .backend_bases import MouseEvent
1211import matplotlib .patches as mpatches
1514
1615
1716needs_usetex = pytest .mark .skipif (
18- not matplotlib .checkdep_usetex (True ),
17+ not mpl .checkdep_usetex (True ),
1918 reason = "This test needs a TeX installation" )
2019
2120
@@ -24,7 +23,7 @@ def test_font_styles():
2423
2524 def find_matplotlib_font (** kw ):
2625 prop = FontProperties (** kw )
27- path = findfont (prop , directory = matplotlib .get_data_path ())
26+ path = findfont (prop , directory = mpl .get_data_path ())
2827 return FontProperties (fname = path )
2928
3029 from matplotlib .font_manager import FontProperties , findfont
@@ -182,7 +181,7 @@ def draw_box(ax, tt):
182181
183182@image_comparison (['antialiased.png' ])
184183def test_antialiasing ():
185- matplotlib .rcParams ['text.antialiased' ] = True
184+ mpl .rcParams ['text.antialiased' ] = True
186185
187186 fig = plt .figure (figsize = (5.25 , 0.75 ))
188187 fig .text (0.5 , 0.75 , "antialiased" , horizontalalignment = 'center' ,
@@ -477,17 +476,17 @@ def test_agg_text_clip():
477476
478477
479478def test_text_size_binding ():
480- matplotlib .rcParams ['font.size' ] = 10
479+ mpl .rcParams ['font.size' ] = 10
481480 fp = mpl .font_manager .FontProperties (size = 'large' )
482481 sz1 = fp .get_size_in_points ()
483- matplotlib .rcParams ['font.size' ] = 100
482+ mpl .rcParams ['font.size' ] = 100
484483
485484 assert sz1 == fp .get_size_in_points ()
486485
487486
488487@image_comparison (['font_scaling.pdf' ])
489488def test_font_scaling ():
490- matplotlib .rcParams ['pdf.fonttype' ] = 42
489+ mpl .rcParams ['pdf.fonttype' ] = 42
491490 fig , ax = plt .subplots (figsize = (6.4 , 12.4 ))
492491 ax .xaxis .set_major_locator (plt .NullLocator ())
493492 ax .yaxis .set_major_locator (plt .NullLocator ())
@@ -575,7 +574,7 @@ def test_text_as_path_opacity():
575574
576575@image_comparison (['text_as_text_opacity.svg' ])
577576def test_text_as_text_opacity ():
578- matplotlib .rcParams ['svg.fonttype' ] = 'none'
577+ mpl .rcParams ['svg.fonttype' ] = 'none'
579578 plt .figure ()
580579 plt .gca ().set_axis_off ()
581580 plt .text (0.25 , 0.25 , '50% using `color`' , color = (0 , 0 , 0 , 0.5 ))
0 commit comments