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: Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Aug 6, 2022
1 parent 42db852 commit 1028bb4
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/sage/geometry/polyhedral_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -2456,19 +2456,30 @@ def exploded_rainbow_plot(polyhedra, *,
- ``polyhedra`` -- an iterable of :class:`~sage.geometry.polyhedron.base.Polyhedron_base` objects
- keyword arguments: see :meth:`~sage.geometry.polyhedral_complex.PolyhedralComplex.plot`
- ``center`` -- (default: ``None``, denoting the origin) the center of explosion
- ``explosion_factor`` -- (default: 1) a nonnegative number; translate polyhedra by this
factor of the distance from ``center`` to their center
- ``sticky_vertices`` -- (default: ``False``) whether to draw line segments between shared
vertices of the given polyhedra
- ``sticky_center`` -- (default: ``True``) whether to draw line segments between ``center``
and the vertices of the given polyhedra
- other keyword arguments are passed on to :meth:`~sage.geometry.polyhedron.base.Polyhedron_base.plot`.
EXAMPLES::
sage: from sage.geometry.polyhedral_complex import exploded_rainbow_plot
sage: p1 = Polyhedron(vertices=[(1, 1), (0, 0), (1, 2)])
sage: p2 = Polyhedron(vertices=[(1, 2), (0, 0), (0, 2)])
sage: p3 = Polyhedron(vertices=[(0, 0), (1, 1), (2, 0)])
sage: exploded_rainbow_plot([p1, p2, p3])
sage: exploded_rainbow_plot([p1, p2, p3]) # optional - sage.plot
Graphics object consisting of 20 graphics primitives
sage: exploded_rainbow_plot([p1, p2, p3], center=(1, 1))
sage: exploded_rainbow_plot([p1, p2, p3], center=(1, 1)) # optional - sage.plot
Graphics object consisting of 19 graphics primitives
sage: exploded_rainbow_plot([p1, p2, p3], center=(1, 1), sticky_vertices=True)
sage: exploded_rainbow_plot([p1, p2, p3], center=(1, 1), sticky_vertices=True) # optional - sage.plot
Graphics object consisting of 23 graphics primitives
"""
from sage.plot.colors import rainbow
Expand Down

0 comments on commit 1028bb4

Please sign in to comment.