Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 75c425c

Browse filesBrowse files
authored
Merge pull request #20238 from timhoffm/doc-set_array
Clarify docstring of ScalarMappable.set/get_array()
2 parents 0554030 + 729f92d commit 75c425c
Copy full SHA for 75c425c

File tree

Expand file treeCollapse file tree

1 file changed

+11
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-2
lines changed

‎lib/matplotlib/cm.py

Copy file name to clipboardExpand all lines: lib/matplotlib/cm.py
+11-2Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,15 @@ def to_rgba(self, x, alpha=None, bytes=False, norm=True):
361361

362362
def set_array(self, A):
363363
"""
364-
Set the image array from array-like *A*.
364+
Set the value array from array-like *A*.
365365
366366
Parameters
367367
----------
368368
A : array-like or None
369+
The values that are mapped to colors.
370+
371+
The base class `.ScalarMappable` does not make any assumptions on
372+
the dimensionality and shape of the value array *A*.
369373
"""
370374
if A is None:
371375
self._A = None
@@ -379,7 +383,12 @@ def set_array(self, A):
379383
self._A = A
380384

381385
def get_array(self):
382-
"""Return the data array."""
386+
"""
387+
Return the array of values, that are mapped to colors.
388+
389+
The base class `.ScalarMappable` does not make any assumptions on
390+
the dimensionality and shape of the array.
391+
"""
383392
return self._A
384393

385394
def get_cmap(self):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.