Skip to content

Commit

Permalink
Add offset label color test & what's new entry
Browse files Browse the repository at this point in the history
  • Loading branch information
bcongdon committed May 19, 2016
1 parent a44f66e commit fd8ec19
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/users/whats_new/offset_label_color.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Axis offset label now responds to `labelcolor`
----------------------------------------------

Axis offset labels are now colored the same as axis tick markers when `labelcolor` is altered.
10 changes: 10 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4477,6 +4477,16 @@ def test_axisbelow():
ax.set_axisbelow(setting)


@cleanup
def test_offset_label_color():
# Tests issue 6440
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1)
ax.plot([1.01e9, 1.02e9, 1.03e9])
ax.yaxis.set_tick_params(labelcolor='red')
assert ax.yaxis.get_offset_text().get_color() == 'red'


@cleanup
def test_large_offset():
fig, ax = plt.subplots()
Expand Down

0 comments on commit fd8ec19

Please sign in to comment.