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

Commit

Permalink
represent the rays of wall by a matrix. add doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
yuan-zhou committed Apr 7, 2018
1 parent fb9f38a commit 959187f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/sage/geometry/cone.py
Expand Up @@ -1007,6 +1007,12 @@ def plot(self, **options):
sage: quadrant = Cone([(1,0), (0,1)])
sage: quadrant.plot()
Graphics object consisting of 9 graphics primitives
Let's plot a halfplane. See :trac:`25114`.
sage: halfplane = Cone([(1,0), (0,1), (-1,0)])
sage: halfplane.plot()
Graphics object consisting of 12 graphics primitives
"""
tp = ToricPlotter(options, self.lattice().degree(), self.rays())
return tp.plot_lattice() + tp.plot_rays() + tp.plot_generators()
Expand Down
2 changes: 1 addition & 1 deletion src/sage/geometry/toric_plotter.py
Expand Up @@ -651,7 +651,7 @@ def plot_walls(self, walls):
if lsd == 0: # Strictly convex wall
r1, r2 = (rays[i] for i in wall.ambient_ray_indices())
elif lsd == 1: # wall is a half-plane
for i, ray in zip(wall.ambient_ray_indices(), wall.rays()):
for i, ray in zip(wall.ambient_ray_indices(), wall.rays().matrix()):
if ray in S:
r1 = rays[i]
else:
Expand Down

0 comments on commit 959187f

Please sign in to comment.