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 (exploded_plot): Do not set a…
Browse files Browse the repository at this point in the history
…lpha=0.5 by default
  • Loading branch information
Matthias Koeppe committed Aug 6, 2022
1 parent 3d84635 commit 85cb04e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/sage/geometry/polyhedral_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,10 +739,10 @@ def plot(self, **kwds):
sage: p3 = Polyhedron(vertices=[(0, 0), (0, 2), (-1, 1)])
sage: pc = PolyhedralComplex([p1, p2, p3, -p1, -p2, -p3])
sage: bb = dict(xmin=-2, xmax=2, ymin=-3, ymax=3, axes=False)
sage: g0 = pc.plot(**bb) # optional - sage.plot
sage: g1 = pc.plot(explosion_factor=0.5, **bb) # optional - sage.plot
sage: g2 = pc.plot(explosion_factor=1, color='rainbow', **bb) # optional - sage.plot
sage: graphics_array([g0, g1, g2]).show(axes=False) # not tested
sage: g0 = pc.plot(**bb) # optional - sage.plot
sage: g1 = pc.plot(explosion_factor=0.5, **bb) # optional - sage.plot
sage: g2 = pc.plot(explosion_factor=1, color='rainbow', alpha=0.5, **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 Expand Up @@ -2540,14 +2540,13 @@ def exploded_plot(polyhedra, *,
options = copy(point)
if color == 'rainbow':
options['color'] = vertex_colors_dict[vertex]
g += plot_point(vertex_translations,
alpha=0.5, **options)
g += plot_point(vertex_translations, **options)
if color == 'rainbow':
cell_colors_dict = dict(zip(polyhedra,
rainbow(len(polyhedra))))
for p, t in zip(polyhedra, translations):
options = copy(kwds)
if color == 'rainbow':
options['color'] = cell_colors_dict[p]
g += (p + t).plot(alpha=0.5, point=False, **options)
g += (p + t).plot(point=False, **options)
return g

0 comments on commit 85cb04e

Please sign in to comment.