8000 DOC sticky edges now uses numpydoc · matplotlib/matplotlib@1a86b08 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1a86b08

Browse files
committed
DOC sticky edges now uses numpydoc
1 parent 840986e commit 1a86b08

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

lib/matplotlib/artist.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -931,19 +931,22 @@ def set_zorder(self, level):
931931
@property
932932
def sticky_edges(self):
933933
"""
934-
The `x` and `y` sticky edge lists for the artist.
934+
`x` and `y` sticky edge lists.
935935
936-
When autoscaling, if a data limit coincides with a value
937-
in the corresponding sticky_edges list, then no margin
938-
will be added--the view limit "sticks" to the edge.
936+
When performing autoscaling, if a data limit coincides with a value in
937+
the corresponding sticky_edges list, then no margin will be added--the
938+
view limit "sticks" to the edge. A typical usecase is histograms,
939+
where one usually expects no margin on the bottom edge (0) of the
940+
histogram.
939941
940942
This attribute cannot be assigned to; however, the `x` and `y` lists
941943
can be modified in place as needed.
942944
943-
Example usage::
945+
Examples
946+
--------
944947
945-
artist.sticky_edges.x[:] = (xmin, xmax)
946-
artist.sticky_edges.y[:] = (ymin, ymax)
948+
>>> artist.sticky_edges.x[:] = (xmin, xmax)
949+
>>> artist.sticky_edges.y[:] = (ymin, ymax)
947950
948951
"""
949952
return self._sticky_edges

0 commit comments

Comments
 (0)
0