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

Skip to content

Commit bd02df0

Browse files
tacaswelltobias47n9e
authored andcommitted
DOC : Added docstrings to _CollectionWithSizes
Added docstrings for get_sizes and set_sizes
1 parent d505cc4 commit bd02df0

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

lib/matplotlib/collections.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,9 +710,30 @@ class _CollectionWithSizes(Collection):
710710
Base class for collections that have an array of sizes.
711711
"""
712712
def get_sizes(self):
713+
"""
714+
Returns the sizes of the elements in the collection. The
715+
value represents the 'area' of the element.
716+
717+
Returns
718+
-------
719+
sizes : array
720+
The 'area' of each element.
721+
"""
713722
return self._sizes
714723

715724
def set_sizes(self, sizes, dpi=72.0):
725+
"""
726+
Set the sizes of each member of the collection.
727+
728+
Parameters
729+
----------
730+
sizes : ndarray or None
731+
The size to set for each element of the collection. The
732+
value is the 'area' of the element.
733+
734+
dpi : float
735+
The dpi of the canvas. Defaults to 72.0.
736+
"""
716737
if sizes is None:
717738
self._sizes = np.array([])
718739
self._transforms = np.empty((0, 3, 3))

0 commit comments

Comments
 (0)