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

Method set_alpha

lib/matplotlib/backend_bases.py:835–850  ·  view source on GitHub ↗

Set the alpha value used for blending - not supported on all backends. If ``alpha=None`` (the default), the alpha components of the foreground and fill colors will be used to set their respective transparencies (where applicable); otherwise, ``alpha`` will override

(self, alpha)

Source from the content-addressed store, hash-verified

833 return self._snap
834
835 def set_alpha(self, alpha):
836 """
837 Set the alpha value used for blending - not supported on all backends.
838
839 If ``alpha=None`` (the default), the alpha components of the
840 foreground and fill colors will be used to set their respective
841 transparencies (where applicable); otherwise, ``alpha`` will override
842 them.
843 """
844 if alpha is not None:
845 self._alpha = alpha
846 self._forced_alpha = True
847 else:
848 self._alpha = 1.0
849 self._forced_alpha = False
850 self.set_foreground(self._rgb, isRGBA=True)
851
852 def set_antialiased(self, b):
853 """Set whether object should be drawn with antialiased rendering."""

Callers

nothing calls this directly

Calls 1

set_foregroundMethod · 0.95

Tested by

no test coverage detected