Skip to content

Commit 3d92406

Browse files
rwpenneygreglucas
andauthored
Apply suggestions from code review by greglucas
Co-authored-by: Greg Lucas <[email protected]>
1 parent e0dcff7 commit 3d92406

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

doc/users/next_whats_new/asinh_scale.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ New axis scale ``asinh``
44
The new ``asinh`` axis scale offers an alternative to ``symlog`` that
55
smoothly transitions between the quasi-linear and asymptotically logarithmic
66
regions of the scale. This is based on an arcsinh transformation that
7-
allows plotting both positive and negative values than span many orders
7+
allows plotting both positive and negative values that span many orders
88
of magnitude. A scale parameter is provided to allow the user
99
to tune the width of the linear region of the scale.
1010

1111
.. plot::
1212

13-
from matplotlib import pyplot as plt
13+
import matplotlib.pyplot as plt
1414
import numpy
1515

1616
fig, (ax0, ax1) = plt.subplots(1, 2, sharex=True)

examples/scales/asinh_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from *separate* linear and logarithmic transformations.
3232
The ``asinh`` scaling uses a transformation that is smooth
3333
for all (finite) values, which is both mathematically cleaner
34-
and should reduce visual artifacts associated with an abrupt
34+
and reduces visual artifacts associated with an abrupt
3535
transition between linear and logarithmic regions of the plot.
3636
3737
See `~.scale.AsinhScale`, `~.scale.SymmetricalLogScale`.
@@ -45,7 +45,7 @@
4545

4646
########################################
4747
# Compare "symlog" and "asinh" behaviour on sample y=x graph,
48-
# where the discontinuous gradient in "symlog" near y=2 is obvious:
48+
# where there is a discontinuous gradient in "symlog" near y=2:
4949
fig1 = plt.figure()
5050
ax0, ax1 = fig1.subplots(1, 2, sharex=True)
5151

lib/matplotlib/scale.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ class AsinhTransform(Transform):
465465
def __init__(self, linear_width):
466466
super().__init__()
467467
if linear_width <= 0.0:
468-
raise ValueError("Scale parameter 'a0' must be strictly positive")
468+
raise ValueError("Scale parameter 'linear_width' must be strictly positive")
469469
self.linear_width = linear_width
470470

471471
def transform_non_affine(self, a):

0 commit comments

Comments
 (0)