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.
2 parents 1468456 + 21e175c commit 5adb516Copy full SHA for 5adb516
2 files changed
lib/matplotlib/tests/test_axes.py
@@ -15,7 +15,8 @@
15
import warnings
16
17
import matplotlib
18
-from matplotlib.testing.decorators import image_comparison, check_figures_equal
+from matplotlib.testing.decorators import (
19
+ image_comparison, check_figures_equal, remove_ticks_and_titles)
20
import matplotlib.pyplot as plt
21
import matplotlib.markers as mmarkers
22
import matplotlib.patches as mpatches
@@ -5845,9 +5846,10 @@ class DummySubplot(matplotlib.axes.SubplotBase, Dummy):
5845
5846
5847
def test_gettightbbox_ignoreNaN():
5848
fig, ax = plt.subplots()
5849
+ remove_ticks_and_titles(fig)
5850
t = ax.text(np.NaN, 1, 'Boo')
5851
renderer = fig.canvas.get_renderer()
- np.testing.assert_allclose(ax.get_tightbbox(renderer).width, 532.444444)
5852
+ np.testing.assert_allclose(ax.get_tightbbox(renderer).width, 496)
5853
5854
5855
def test_scatter_series_non_zero_index(pd):
lib/mpl_toolkits/tests/test_axes_grid1.py
@@ -1,6 +1,7 @@
1
2
3
-from matplotlib.testing.decorators import image_comparison
4
+ image_comparison, remove_ticks_and_titles)
5
6
from mpl_toolkits.axes_grid1 import host_subplot
7
from mpl_toolkits.axes_grid1 import make_axes_locatable
@@ -410,7 +411,6 @@ def test_image_grid():
410
411
412
413
def test_gettightbbox():
-
414
fig, ax = plt.subplots(figsize=(8, 6))
415
416
l, = ax.plot([1, 2, 3], [0, 1, 0])
@@ -419,6 +419,8 @@ def test_gettightbbox():
419
ax_zoom.plot([1, 2, 3], [0, 1, 0])
420
421
mark_inset(ax, ax_zoom, loc1=1, loc2=3, fc="none", ec='0.3')
422
+
423
424
bbox = fig.get_tightbbox(fig.canvas.get_renderer())
425
np.testing.assert_array_almost_equal(bbox.extents,
- [-18.022743, -14.118056, 7.332813, 5.4625])
426
+ [-17.7, -13.9, 7.2, 5.4])
0 commit comments