Skip to content

Deprecate the opacity argument for plot3d and use alpha #21984

@mathzeta

Description

@mathzeta

Most 3d plot functions use the "opacity" keyword argument to set the transparency of the plot. On the other hand, most 2d plot functions use the "alpha" keyword argument.

It seems that the "opacity" keyword argument is also not well-documented. It sometimes appears only in the Examples sections, and not in the Input section. This is the case, at least in the following:

  • plot3d()
  • line()
  • circle()
  • parametric_plot3d()
  • revolution_plot3d()

Harmonizing the 2d plot and 3d plot functions would be a better UI. For example, changing a single letter of obj.plot2d(some_args, alpha=0.5) to obj.plot3d(some_args, alpha=0.5) (or vice versa) should "just work", without ignoring arguments.

Depends on #25095

CC: @yuan-zhou @mkoeppe @slel @jcamp0x2a @paulmasson

Component: graphics

Keywords: days79

Issue created by migration from https://trac.sagemath.org/ticket/21984

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions