Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 47193ee

Browse files
committed
Merge pull request #1092 from pelson/subplot_int
Adds a test for subplot float handling (#880)
2 parents c1a1079 + aad530e commit 47193ee

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
from nose.tools import assert_equal
12
import numpy as np
23
from numpy import ma
4+
35
import matplotlib
46
from matplotlib.testing.decorators import image_comparison, cleanup
57
import matplotlib.pyplot as plt
@@ -1319,6 +1321,12 @@ def test_mixed_collection():
13191321
ax.set_xlim(0, 16)
13201322
ax.set_ylim(0, 16)
13211323

1324+
@cleanup
1325+
def test_subplot_key_hash():
1326+
ax = plt.subplot(np.float64(5.5), np.int64(1), np.float64(1.2))
1327+
ax.twinx()
1328+
assert_equal((5, 1, 0, None), ax.get_subplotspec().get_geometry())
1329+
13221330

13231331
@image_comparison(baseline_images=['specgram_freqs'], remove_text=True,
13241332
extensions=['png'])

0 commit comments

Comments
 (0)