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 7997f4d commit 0365455Copy full SHA for 0365455
1 file changed
lib/matplotlib/tests/test_legend.py
@@ -569,10 +569,8 @@ def test_warn_big_data_best_loc():
569
fig, ax = plt.subplots()
570
ax.plot(np.arange(200001), label='Is this big data?')
571
with pytest.warns(UserWarning) as records:
572
- l = ax.legend()
573
- # We need to call an internal set method tricking it into thinking
574
- # 'best' location was default.
575
- l._set_loc(l.codes['best'], is_initial_setting=True)
+ with rc_context({'legend.loc': 'best'}):
+ l = ax.legend()
576
fig.canvas.draw()
577
# The _find_best_position method of Legend is called twice, duplicating
578
# the warning message.
0 commit comments