Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/sage/geometry/polyhedral_complex.py: Expand example of plot method
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Aug 6, 2022
1 parent 1028bb4 commit 9eebc32
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/sage/geometry/polyhedral_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,13 @@ def plot(self, **kwds):
sage: p1 = Polyhedron(vertices=[(1, 1), (0, 0), (1, 2)])
sage: p2 = Polyhedron(vertices=[(1, 2), (0, 0), (0, 2)])
sage: pc = PolyhedralComplex([p1, p2])
sage: pc.plot() # optional - sage.plot
Graphics object consisting of 10 graphics primitives
sage: p3 = Polyhedron(vertices=[(0, 0), (0, 2), (-1, 1)])
sage: pc = PolyhedralComplex([p1, p2, p3])
sage: bb = dict(xmin=-2, xmax=2, ymin=-0.5, ymax=3, axes=False)
sage: g0 = pc.plot(**bb) # optional - sage.plot
sage: g1 = pc.plot(explosion_factor=0.3, **bb) # optional - sage.plot
sage: g2 = pc.plot(explosion_factor=1, **bb) # optional - sage.plot
sage: graphics_array([g0, g1, g2]).show(axes=False) # not tested
"""
if self.dimension() > 3:
raise ValueError("cannot plot in high dimension")
Expand Down

0 comments on commit 9eebc32

Please sign in to comment.