VOOZH about

URL: https://www.geeksforgeeks.org/python/matplotlib-axes-axes-set_alpha-in-python/

⇱ Matplotlib.axes.Axes.set_alpha() in Python - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Matplotlib.axes.Axes.set_alpha() in Python

Last Updated : 12 Jul, 2025
Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute.

matplotlib.axes.Axes.set_alpha() Function

The Axes.set_alpha() function in axes module of matplotlib library is used to set the alpha value used for blending.
Syntax: Axes.set_alpha(self, alpha) Parameters: This method accepts only one parameters.
  • alpha: This parameter is the contains float value or None.
Returns: This method does not return any value.
Below examples illustrate the matplotlib.axes.Axes.set_alpha() function in matplotlib.axes: Example 1: Output: 👁 Image
Example 2:
Output: 👁 Image
Comment