Skip to content

Commit 0249861

Browse files
committed
Added cross-references between symlog and asinh demo pages
1 parent 8168e56 commit 0249861

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

examples/scales/asinh_demo.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,12 @@
9595
ax.set_ylim(-50, 50)
9696
ax.grid()
9797

98-
9998
plt.show()
99+
100+
########################################
101+
#
102+
# .. admonition:: References
103+
#
104+
# - `matplotlib.scale.AsinhScale`
105+
# - `matplotlib.ticker.AsinhLocator`
106+
# - `matplotlib.scale.SymmetricalLogScale`

examples/scales/symlog_demo.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,17 @@
3333

3434
fig.tight_layout()
3535
plt.show()
36+
37+
########################################
38+
# It should be noted that the coordinate transform used by ``symlog``
39+
# has a discontinuous gradient at the transition between its linear
40+
# and logarithmic regions. The ``asinh`` axis scale is an alternative
41+
# technique that may avoid visual artifacts caused by these disconinuities.
42+
43+
########################################
44+
#
45+
# .. admonition:: References
46+
#
47+
# - `matplotlib.scale.SymmetricalLogScale`
48+
# - `matplotlib.ticker.SymmetricalLogLocator`
49+
# - `matplotlib.scale.AsinhScale`

lib/matplotlib/tests/test_scale.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,9 @@ def test_base_init(self):
257257
assert s3._base == 3
258258
assert s3._subs == (2,)
259259

260-
s7 = AsinhScale(axis=None, base=7)
260+
s7 = AsinhScale(axis=None, base=7, subs=(2, 4))
261261
assert s7._base == 7
262-
assert s7._subs == (2, 5)
262+
assert s7._subs == (2, 4)
263263

264264
def test_bad_scale(self):
265265
fig, ax = plt.subplots()

0 commit comments

Comments
 (0)