MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / set_alpha

Method set_alpha

lib/matplotlib/collections.py:953–968  ·  view source on GitHub ↗

Set the transparency of the collection. Parameters ---------- alpha : float or array of float or None If not None, *alpha* values must be between 0 and 1, inclusive. If an array is provided, its length must match the number of ele

(self, alpha)

Source from the content-addressed store, hash-verified

951 self._set_hatchcolor(c)
952
953 def set_alpha(self, alpha):
954 """
955 Set the transparency of the collection.
956
957 Parameters
958 ----------
959 alpha : float or array of float or None
960 If not None, *alpha* values must be between 0 and 1, inclusive.
961 If an array is provided, its length must match the number of
962 elements in the collection. Masked values and nans are not
963 supported.
964 """
965 artist.Artist._set_alpha_for_array(self, alpha)
966 self._set_facecolor(self._original_facecolor)
967 self._set_edgecolor(self._original_edgecolor)
968 self._set_hatchcolor(self._original_hatchcolor)
969
970 set_alpha.__doc__ = artist.Artist._set_alpha_for_array.__doc__
971

Callers 1

set_alphaMethod · 0.45

Calls 4

_set_facecolorMethod · 0.95
_set_edgecolorMethod · 0.95
_set_hatchcolorMethod · 0.95
_set_alpha_for_arrayMethod · 0.80

Tested by

no test coverage detected