Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0c021b6

Browse files
committed
Clarify secondary-axis documentation
The functions used for the transformation to and from the secondary axis must accept numpy arrays, which was not explicit in the documentation.
1 parent 078790e commit 0c021b6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/axes/_secondary_axes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ def set_color(self, color):
276276
If a 2-tuple of functions, the user specifies the transform
277277
function and its inverse. i.e.
278278
``functions=(lambda x: 2 / x, lambda x: 2 / x)`` would be an
279-
reciprocal transform with a factor of 2.
279+
reciprocal transform with a factor of 2. Both functions must accept
280+
numpy arrays as input.
280281
281282
The user can also directly supply a subclass of
282283
`.transforms.Transform` so long as it has an inverse.

0 commit comments

Comments
 (0)