@@ -100,13 +100,13 @@ def test_text_nonexistent_filename():
100
100
@pytest .mark .mpl_image_compare
101
101
def test_text_position_four_corners (region ):
102
102
"""
103
- Print text at four corners (top left/right, bottom left/right) of map.
103
+ Print text at center middle and four corners (top left/right, bottom
104
+ left/right) of map.
104
105
"""
105
106
fig = Figure ()
107
+ fig .text (region = region , projection = "x1c" , frame = "a" , position = "CM" , text = "CM" )
106
108
for position in ("TL" , "TR" , "BL" , "BR" ):
107
- fig .text (
108
- region = region , projection = "x1c" , frame = "a" , position = position , text = position
109
- )
109
+ fig .text (frame = "a" , position = position , text = position )
110
110
return fig
111
111
112
112
@@ -124,19 +124,14 @@ def test_text_xy_with_position_fails(region, projection):
124
124
@pytest .mark .mpl_image_compare
125
125
def test_text_position_offset_with_line (region ):
126
126
"""
127
- Print text at four corners (top left/right, bottom left/right) of map,
128
- offset by 0.5 cm, with a line drawn from the original to the shifted point.
127
+ Print text at centre middle and four corners (top left/right, bottom
128
+ left/right) of map, offset by 0.5 cm, with a line drawn from the original
129
+ to the shifted point.
129
130
"""
130
131
fig = Figure ()
132
+ fig .text (region = region , projection = "x1c" , frame = "a" , position = "CM" , text = "CM" )
131
133
for position in ("TL" , "TR" , "BL" , "BR" ):
132
- fig .text (
133
- region = region ,
134
- projection = "x1c" ,
135
- frame = "a" ,
136
- position = position ,
137
- text = position ,
138
- offset = "j0.5c+v" ,
139
- )
134
+ fig .text (position = position , text = position , offset = "j0.5c+v" )
140
135
return fig
141
136
142
137
0 commit comments