8000 Add offset label color test & what's new entry · matplotlib/matplotlib@fd8ec19 · GitHub
[go: up one dir, main page]

Skip to content

Commit fd8ec19

Browse files
committed
Add offset label color test & what's new entry
1 parent a44f66e commit fd8ec19

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Axis offset label now responds to `labelcolor`
2+
----------------------------------------------
3+
4+
Axis offset labels are now colored the same as axis tick markers when `labelcolor` is altered.

lib/matplotlib/tests/test_axes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4477,6 +4477,16 @@ def test_axisbelow():
44774477
ax.set_axisbelow(setting)
44784478

44794479

4480+
@cleanup
4481+
def test_offset_label_color():
4482+
# Tests issue 6440
4483+
fig = plt.figure()
4484+
ax = fig.add_subplot(1, 1, 1)
4485+
ax.plot([1.01e9, 1.02e9, 1.03e9])
4486+
ax.yaxis.set_tick_params(labelcolor='red')
4487+
assert ax.yaxis.get_offset_text().get_color() == 'red'
4488+
4489+
44804490
@cleanup
44814491
def test_large_offset():
44824492
fig, ax = plt.subplots()

0 commit comments

Comments
 (0)
0