Skip to content

Commit b719b7b

Browse files
committed
add test for legend columns
1 parent 5dd1a27 commit b719b7b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/test_legend_columns.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
import helpers
4+
5+
6+
def plot():
7+
import numpy as np
8+
import matplotlib.pyplot as plt
9+
fig, ax = plt.subplots(figsize=(17, 6))
10+
ax.plot(np.array([1, 2, 3, 4, 5]), label='Test 1')
11+
ax.plot(np.array([5, 4, 3, 2, 1]), label='Test 2')
12+
ax.legend(ncol=2, loc='upper center')
13+
return fig
14+
15+
16+
def test():
17+
phash = helpers.Phash(plot())
18+
assert phash.phash == 'a3267e19cad99998', phash.get_details()
19+
return
20+
21+
22+
if __name__ == '__main__':
23+
helpers.compare_with_latex(plot())

0 commit comments

Comments
 (0)