Opened 6 years ago

Closed 6 years ago

#17209 closed defect (fixed)

allow the use of distinct edgecolor and color for polygons in 2D

Reported by: chapoton Owned by:
Priority: minor Milestone: sage-6.4
Component: graphics Keywords: edgecolor, polygon, plot2d
Cc: Merged in:
Authors: Frédéric Chapoton Reviewers: Volker Braun
Report Upstream: N/A Work issues:
Branch: a1c72c3 (Commits) Commit: a1c72c36c80752f748036ac4f19008896118815f
Dependencies: Stopgaps:

Description

I would like to have a green polygon with black border. I can achieve this by superposing two polygons:

sage: P = polygon([[0,0],[0,1],[2,1],[1,0]],color='limegreen',fill=True)
sage: P += polygon([[0,0],[0,1],[2,1],[1,0]],color='black',fill=False)
sage: P

It should be possible to do that with one polygon, using the edgecolor keyword of matplotlib.

See http://ask.sagemath.org/question/24600/how-to-plot-a-polygon-with-distinct-colors-for-border-and-interior/

Change History (4)

comment:1 Changed 6 years ago by chapoton

  • Authors set to Frédéric Chapoton
  • Branch set to u/chapoton/17209
  • Commit set to a1c72c36c80752f748036ac4f19008896118815f
  • Status changed from new to needs_review

New commits:

a1c72c3trac #17209 two colors for filled polygon2d

comment:2 Changed 6 years ago by vbraun

  • Reviewers set to Volker Braun
  • Status changed from needs_review to positive_review

comment:3 Changed 6 years ago by chapoton

  • Summary changed from allow the use of distinct edgecolor and color for polygons (and other 2d shapes) to allow the use of distinct edgecolor and color for polygons in 2D

Thanks a lot, Volker. This will be very useful for me.

comment:4 Changed 6 years ago by vbraun

  • Branch changed from u/chapoton/17209 to a1c72c36c80752f748036ac4f19008896118815f
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.