Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c1b1d93

Browse files
author
Matthias Koeppe
committedOct 27, 2021
src/sage/geometry/polyhedron/plot.py: Add more # optional - sage.plot
1 parent 30eee2e commit c1b1d93

File tree

1 file changed

+19
-19
lines changed
  • src/sage/geometry/polyhedron

1 file changed

+19
-19
lines changed
 

‎src/sage/geometry/polyhedron/plot.py

+19-19
Original file line numberDiff line numberDiff line change
@@ -881,8 +881,8 @@ def render_points_1d(self, **kwds):
881881
882882
sage: cube1 = polytopes.hypercube(1)
883883
sage: proj = cube1.projection()
884-
sage: points = proj.render_points_1d()
885-
sage: points._objects
884+
sage: points = proj.render_points_1d() # optional - sage.plot
885+
sage: points._objects # optional - sage.plot
886886
[Point set defined by 2 point(s)]
887887
"""
888888
return point2d([c + [0] for c in self.coordinates_of(self.points)], **kwds)
@@ -902,8 +902,8 @@ def render_line_1d(self, **kwds):
902902
903903
EXAMPLES::
904904
905-
sage: outline = polytopes.hypercube(1).projection().render_line_1d()
906-
sage: outline._objects[0]
905+
sage: outline = polytopes.hypercube(1).projection().render_line_1d() # optional - sage.plot
906+
sage: outline._objects[0] # optional - sage.plot
907907
Line defined by 2 points
908908
"""
909909
if len(self.lines) == 0:
@@ -922,8 +922,8 @@ def render_points_2d(self, **kwds):
922922
923923
sage: hex = polytopes.regular_polygon(6)
924924
sage: proj = hex.projection()
925-
sage: hex_points = proj.render_points_2d()
926-
sage: hex_points._objects
925+
sage: hex_points = proj.render_points_2d() # optional - sage.plot
926+
sage: hex_points._objects # optional - sage.plot
927927
[Point set defined by 6 point(s)]
928928
"""
929929
return point2d(self.coordinates_of(self.points), **kwds)
@@ -935,8 +935,8 @@ def render_outline_2d(self, **kwds):
935935
EXAMPLES::
936936
937937
sage: penta = polytopes.regular_polygon(5)
938-
sage: outline = penta.projection().render_outline_2d()
939-
sage: outline._objects[0]
938+
sage: outline = penta.projection().render_outline_2d() # optional - sage.plot
939+
sage: outline._objects[0] # optional - sage.plot
940940
Line defined by 2 points
941941
"""
942942
wireframe = []
@@ -957,8 +957,8 @@ def render_fill_2d(self, **kwds):
957957
sage: cps = [i^3 for i in srange(-2,2,1/5)]
958958
sage: p = Polyhedron(vertices = [[(t^2-1)/(t^2+1),2*t/(t^2+1)] for t in cps])
959959
sage: proj = p.projection()
960-
sage: filled_poly = proj.render_fill_2d()
961-
sage: filled_poly.axes_width()
960+
sage: filled_poly = proj.render_fill_2d() # optional - sage.plot
961+
sage: filled_poly.axes_width() # optional - sage.plot
962962
0.8
963963
"""
964964
poly = [polygon2d(self.coordinates_of(p), **kwds)
@@ -973,8 +973,8 @@ def render_vertices_3d(self, **kwds):
973973
974974
sage: p = polytopes.cross_polytope(3)
975975
sage: proj = p.projection()
976-
sage: verts = proj.render_vertices_3d()
977-
sage: verts.bounding_box()
976+
sage: verts = proj.render_vertices_3d() # optional - sage.plot
977+
sage: verts.bounding_box() # optional - sage.plot
978978
((-1.0, -1.0, -1.0), (1.0, 1.0, 1.0))
979979
"""
980980
return point3d(self.coordinates_of(self.points), **kwds)
@@ -987,8 +987,8 @@ def render_wireframe_3d(self, **kwds):
987987
988988
sage: cube = polytopes.hypercube(3)
989989
sage: cube_proj = cube.projection()
990-
sage: wire = cube_proj.render_wireframe_3d()
991-
sage: print(wire.tachyon().split('\n')[77]) # for testing
990+
sage: wire = cube_proj.render_wireframe_3d() # optional - sage.plot
991+
sage: print(wire.tachyon().split('\n')[77]) # for testing # optional - sage.plot
992992
FCylinder base 1.0 1.0 -1.0 apex -1.0 1.0 -1.0 rad 0.005 texture...
993993
"""
994994
wireframe = []
@@ -1007,8 +1007,8 @@ def render_solid_3d(self, **kwds):
10071007
EXAMPLES::
10081008
10091009
sage: p = polytopes.hypercube(3).projection()
1010-
sage: p_solid = p.render_solid_3d(opacity = .7)
1011-
sage: type(p_solid)
1010+
sage: p_solid = p.render_solid_3d(opacity=.7) # optional - sage.plot
1011+
sage: type(p_solid) # optional - sage.plot
10121012
<class 'sage.plot.plot3d.index_face_set.IndexFaceSet'>
10131013
"""
10141014
polys = self.polygons
@@ -1031,9 +1031,9 @@ def render_0d(self, point_opts=None, line_opts=None, polygon_opts=None):
10311031
10321032
EXAMPLES::
10331033
1034-
sage: print(Polyhedron([]).projection().render_0d().description())
1034+
sage: print(Polyhedron([]).projection().render_0d().description()) # optional - sage.plot
10351035
<BLANKLINE>
1036-
sage: print(Polyhedron(ieqs=[(1,)]).projection().render_0d().description())
1036+
sage: print(Polyhedron(ieqs=[(1,)]).projection().render_0d().description()) # optional - sage.plot
10371037
Point set defined by 1 point(s): [(0.0, 0.0)]
10381038
"""
10391039
if point_opts is None:
@@ -1062,7 +1062,7 @@ def render_1d(self, point_opts=None, line_opts=None, polygon_opts=None):
10621062
10631063
EXAMPLES::
10641064
1065-
sage: Polyhedron([(0,), (1,)]).projection().render_1d()
1065+
sage: Polyhedron([(0,), (1,)]).projection().render_1d() # optional - sage.plot
10661066
Graphics object consisting of 2 graphics primitives
10671067
"""
10681068
plt = Graphics()

0 commit comments

Comments
 (0)
This repository has been archived.