8000 Added moving offset label text · matplotlib/matplotlib@a378128 · GitHub
[go: up one dir, main page]

Skip to content

Commit a378128

Browse files
committed
Added moving offset label text
Added a test to check whether offseting a label works
1 parent 63e1c1b commit a378128

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3508,6 +3508,15 @@ def test_color_None():
35083508
def test_numerical_hist_label():
35093509
fig, ax = plt.subplots()
35103510
ax.hist([range(15)] * 5, label=range(5))
3511+
3512+
@cleanup
3513+
def test_move_offsetlabel():
3514+
data = np.random.random(10) * 1e-22
3515+
fig, ax = plt.subplots()
3516+
ax.plot(data)
3517+
ax.yaxis.set_label_position('right')
3518+
ax.yaxis.tick_right()
3519+
assert_equal((1, 0.5), ax.yaxis.offsetText.get_position())
35113520

35123521
if __name__ == '__main__':
35133522
import nose

0 commit comments

Comments
 (0)
0