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

Skip to content

Commit a770e91

Browse files
committed
Removed parametrize usage
1 parent b69d32d commit a770e91

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4603,31 +4603,29 @@ def test_hist_stacked_bar():
46034603
ax.legend(loc='upper right', bbox_to_anchor=(1.0, 1.0), ncols=1)
46044604

46054605

4606-
@pytest.mark.parametrize('histtype, fill', [('bar', False), ('bar', True),
4607-
('step', False), ('step', True)])
4608-
@image_comparison(['hist_vectorized_params1', 'hist_vectorized_params2',
4609-
'hist_vectorized_params3', 'hist_vectorized_params4'],
4606+
@image_comparison(['hist_vectorized_params_bar', 'hist_vectorized_params_step'],
46104607
extensions=["png"], remove_text=True)
4611-
def test_hist_vectorized_params(histtype, fill):
4612-
fig, axs = plt.subplots(2, 3, figsize=(8, 6))
4613-
fig.delaxes(axs[1, 1])
4614-
ax1, ax2, ax3, ax4, _, ax6 = axs.flatten()
4615-
4608+
def test_hist_vectorized_params():
46164609
np.random.seed(19680801)
46174610
x = [np.random.randn(n) for n in [2000, 5000, 10000]]
46184611

4619-
# Only linestyle
4620-
ax1.hist(x, bins=10, histtype=histtype, fill=fill, linestyle=["-", "--", ":"])
4621-
# Only edgecolor
4622-
ax2.hist(x, bins=10, histtype=histtype, fill=fill,
4623-
edgecolor=["red", "black", "blue"])
4624-
# Only facecolor
4625-
ax3.hist(x, bins=10, histtype=histtype, fill=fill,
4626-
facecolor=["blue", "yellow", "brown"])
4627-
# Only linewidth
4628-
ax4.hist(x, bins=10, histtype=histtype, fill=fill, linewidth=[1, 1.5, 2])
4629-
# Only hatch
4630-
ax6.hist(x, bins=10, histtype=histtype, fill=fill, hatch=["/", "\\", "."])
4612+
for histtype in ['bar', 'step']:
4613+
fig, axs = plt.subplots(2, 3, figsize=(8, 6))
4614+
fig.delaxes(axs[1, 1])
4615+
ax1, ax2, ax3, ax4, _, ax6 = axs.flatten()
4616+
4617+
# Only linestyle
4618+
ax1.hist(x, bins=10, histtype=histtype, linestyle=["-", "--", ":"])
4619+
# Only edgecolor
4620+
ax2.hist(x, bins=10, histtype=histtype,
4621+
edgecolor=["red", "black", "blue"])
4622+
# Only facecolor
4623+
ax3.hist(x, bins=10, histtype=histtype,
4624+
facecolor=["blue", "yellow", "brown"])
4625+
# Only linewidth
4626+
ax4.hist(x, bins=10, histtype=histtype, linewidth=[1, 1.5, 2])
4627+
# Only hatch
4628+
ax6.hist(x, bins=10, histtype=histtype, hatch=["/", "\\", "."])
46314629

46324630

46334631
def test_hist_barstacked_bottom_unchanged():

0 commit comments

Comments
 (0)