How to | Add Transparency to Plots

Transparency is useful in plots when you need an unobstructed view of multiple components of one plot, or simply want to lighten a single plot component against a white background. The Wolfram Language uses the graphics directive Opacity to apply transparency to graphics objects. Opacity can be used with most visualization functions.

Here is a 2D plot:

In[1]:=
Click for copyable input
Out[1]=

Use the PlotStyle option with Opacity to make the plot 70% transparent:

In[2]:=
Click for copyable input
Out[2]=

Here is a 3D plot:

In[3]:=
Click for copyable input
Out[3]=

Make the plot 60% transparent:

In[4]:=
Click for copyable input
Out[4]=

Add different transparency settings for plots of multiple functions:

In[5]:=
Click for copyable input
Out[5]=

Here is a 2D region determined by two inequalities:

In[6]:=
Click for copyable input
Out[6]=

Make the plot 50% transparent:

In[7]:=
Click for copyable input
Out[7]=
    

Use Opacity to see the inner parts of a plot:

In[1]:=
Click for copyable input
Out[1]=

Use the ContourStyle option of ContourPlot3D with Opacity:

In[2]:=
Click for copyable input
Out[2]=
    

You can also add transparency to graphics.

Make a 75% transparent disk:

In[1]:=
Click for copyable input
Out[1]=

Opacity can have values between 0 and 1, with 0 corresponding to perfect transparency:

In[2]:=
Click for copyable input
Out[2]=

Use Opacity with a color:

In[3]:=
Click for copyable input
Out[3]=
    

Opacity interacts well with other Wolfram Language functions: