summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Gourgoulhon <eric.gourgoulhon@obspm.fr>2015-06-30 15:58:15 +0200
committerEric Gourgoulhon <eric.gourgoulhon@obspm.fr>2015-06-30 15:58:15 +0200
commit57b21df71dc774e673be2f2150a197cfd5bc5a8c (patch)
tree93983716277f579282c18d2268109f4690010d71
parentImprove documentation of RealChart.plot() and TopManifoldPoint.plot() (diff)
Add doctest to set_axes_labels
-rw-r--r--src/sage/manifolds/utilities.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sage/manifolds/utilities.py b/src/sage/manifolds/utilities.py
index 732a4a7..634929b 100644
--- a/src/sage/manifolds/utilities.py
+++ b/src/sage/manifolds/utilities.py
@@ -924,6 +924,18 @@ def set_axes_labels(graph, xlabel, ylabel, zlabel, **kwds):
- the 3D graphic object with text3d labels added.
+ EXAMPLE::
+
+ sage: g = sphere()
+ sage: print g
+ Graphics3d Object
+ sage: show(g) # no axes labels
+ sage: from sage.manifolds.utilities import set_axes_labels
+ sage: ga = set_axes_labels(g, 'X', 'Y', 'Z', color='red')
+ sage: print ga
+ Graphics3d Object
+ sage: show(ga) # the 3D frame has now axes labels
+
"""
from sage.plot.plot3d.shapes2 import text3d
xmin, ymin, zmin = graph.bounding_box()[0]