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

Skip to content

Commit b98fc03

Browse files
Apply suggestions from code review
Co-authored-by: Tim Hoffmann <[email protected]>
1 parent d2b39dd commit b98fc03

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1246,6 +1246,11 @@ def _set_offsets3d(col_3d, offsets, zdir='z'):
12461246
"""
12471247
Set the 3d offsets for the collection.
12481248
1249+
.. note::
1250+
1251+
Since 3D collections have no common 3D base class, this function
1252+
factors out the common code for ``set_offests3d()`` methods.
1253+
12491254
Parameters
12501255
----------
12511256
offsets : (N, 3) or (3,) array-like
@@ -1265,7 +1270,20 @@ def _set_offsets3d(col_3d, offsets, zdir='z'):
12651270

12661271

12671272
def _get_offsets3d(col3d):
1268-
"""Return the offsets for the collection."""
1273+
"""
1274+
Return the offsets for the collection.
1275+
1276+
.. note::
1277+
1278+
Since 3D collections have no common 3D base class, this function
1279+
factors out the common code for ``get_offests3d()`` methods.
1280+
1281+
Usage pattern::
1282+
1283+
def get_offsets3d(self):
1284+
return _get_offsets3d(self)
1285+
1286+
"""
12691287
# Default to zeros in the no-offset (None) case
12701288
return np.zeros((1, 3)) if col3d._offsets3d is None else col3d._offsets3d
12711289

0 commit comments

Comments
 (0)