Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c1fe64 commit 18fafb0Copy full SHA for 18fafb0
1 file changed
lib/matplotlib/tests/test_axes.py
@@ -5301,13 +5301,16 @@ def test_title_pad():
5301
5302
def test_title_location_roundtrip():
5303
fig, ax = plt.subplots()
5304
+ # set default title location
5305
+ plt.rcParams['axes.titlelocation'] = 'center'
5306
+
5307
ax.set_title('aardvark')
5308
ax.set_title('left', loc='left')
5309
ax.set_title('right', loc='right')
5310
5311
assert 'left' == ax.get_title(loc='left')
5312
assert 'right' == ax.get_title(loc='right')
- assert 'aardvark' == ax.get_title()
5313
+ assert 'aardvark' == ax.get_title(loc='center')
5314
5315
with pytest.raises(ValueError):
5316
ax.get_title(loc='foo')
0 commit comments