Opened 2 years ago

Closed 23 months ago

#25095 closed defect (fixed)

polygon3d ignores the "alpha" (and equivalent "opacity") argument

Reported by: yzh Owned by:
Priority: major Milestone: sage-8.2
Component: graphics Keywords: IMA-PolyGeom, alpha, opacity, transparency, 3d
Cc: mkoeppe, slelievre Merged in:
Authors: Yuan Zhou Reviewers: Jean-Philippe Labbé
Report Upstream: N/A Work issues:
Branch: 93fe1e2 (Commits) Commit: 93fe1e2cc56f22d3662872d83a0ce7510e4d0e69
Dependencies: Stopgaps:

Description (last modified by yzh)

The methods sage.plot.plot3d.shapes2.polygon3d and sage.plot.plot3d.shapes2.polygons3d have the keyword argument "alpha" (as well as the equivalent, outdated "opacity" argument). However it is not passed to the plot function. For example,

polygon3d([[1, 2, 3], [0,1,0], [1,0,1], [3,0,0]], color=(0,1,0), alpha=0.5)

or

polygon3d([[1, 2, 3], [0,1,0], [1,0,1], [3,0,0]], color=(0,1,0), opacity=0.5)

is treated as opacity=1.

Related tickets: #21984

Update: The argument "alpha" is equivalent to "opacity" in all the 3d plot functions, such as point3d, line3d, sphere, icosahedron, tetrahedron, dodecahedron, polygon3d, polygons3d, bezier3d, parametric_plot3d, revolution_plot3d, `arrow3d', etc.

#260, #9491, #15729, #21984, #23104.

Change History (12)

comment:1 Changed 2 years ago by yzh

  • Branch set to u/yzh/polygon3d_ignores_the__opacity__argument

comment:2 Changed 2 years ago by yzh

  • Authors set to Yuan Zhou
  • Cc mkoeppe added
  • Commit set to 8948ca22289a7dd97a68ac037ca035a26f2ac6be
  • Status changed from new to needs_review

New commits:

f96943fpass extra kwds such as opacity in IndexFaceSet
8948ca2remove obsolete docstring

comment:3 Changed 2 years ago by slelievre

  • Status changed from needs_review to needs_work

For consistency, use alpha instead of opacity, see #21984.

comment:4 Changed 2 years ago by slelievre

  • Cc slelievre added
  • Keywords alpha opacity transparency 3d added

Related tickets: #260, #9491, #15729, #21984, #23104.

comment:5 Changed 2 years ago by git

  • Commit changed from 8948ca22289a7dd97a68ac037ca035a26f2ac6be to 6d6a2511a09e63ba33de177fa4ea1826db114dc3

Branch pushed to git repo; I updated commit sha1. New commits:

6d6a251make keyword alpha equivalent to opacity

comment:6 Changed 2 years ago by yzh

  • Description modified (diff)
  • Status changed from needs_work to needs_review
  • Summary changed from polygon3d ignores the "opacity" argument to polygon3d ignores the "alpha" (and equivalent "opacity") argument

New commits:

6d6a251make keyword alpha equivalent to opacity

comment:7 Changed 2 years ago by yzh

  • Description modified (diff)

comment:8 Changed 2 years ago by git

  • Commit changed from 6d6a2511a09e63ba33de177fa4ea1826db114dc3 to e01426f55fdad6ab9204b1afaa5fb9772ffca919

Branch pushed to git repo; I updated commit sha1. New commits:

e01426fimport decorator rename_keyword

comment:9 Changed 2 years ago by git

  • Commit changed from e01426f55fdad6ab9204b1afaa5fb9772ffca919 to 93fe1e2cc56f22d3662872d83a0ce7510e4d0e69

Branch pushed to git repo; I updated commit sha1. New commits:

93fe1e2keywords alpha and opacity play the same role in all plot3d functions

comment:10 Changed 2 years ago by yzh

  • Description modified (diff)

comment:11 Changed 2 years ago by jipilab

  • Reviewers set to Jean-Philippe Labbé
  • Status changed from needs_review to positive_review

Looks good to me.

comment:12 Changed 23 months ago by vbraun

  • Branch changed from u/yzh/polygon3d_ignores_the__opacity__argument to 93fe1e2cc56f22d3662872d83a0ce7510e4d0e69
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.