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

Commit 959187f

Browse files
committed
represent the rays of wall by a matrix. add doctest
1 parent fb9f38a commit 959187f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/sage/geometry/cone.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,12 @@ def plot(self, **options):
10071007
sage: quadrant = Cone([(1,0), (0,1)])
10081008
sage: quadrant.plot()
10091009
Graphics object consisting of 9 graphics primitives
1010+
1011+
Let's plot a halfplane. See :trac:`25114`.
1012+
1013+
sage: halfplane = Cone([(1,0), (0,1), (-1,0)])
1014+
sage: halfplane.plot()
1015+
Graphics object consisting of 12 graphics primitives
10101016
"""
10111017
tp = ToricPlotter(options, self.lattice().degree(), self.rays())
10121018
return tp.plot_lattice() + tp.plot_rays() + tp.plot_generators()

src/sage/geometry/toric_plotter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ def plot_walls(self, walls):
651651
if lsd == 0: # Strictly convex wall
652652
r1, r2 = (rays[i] for i in wall.ambient_ray_indices())
653653
elif lsd == 1: # wall is a half-plane
654-
for i, ray in zip(wall.ambient_ray_indices(), wall.rays()):
654+
for i, ray in zip(wall.ambient_ray_indices(), wall.rays().matrix()):
655655
if ray in S:
656656
r1 = rays[i]
657657
else:

0 commit comments

Comments
 (0)