How to Alpha Aesthetic


Alpha is another aesthetic property. The use of transparency may have several reasons. You can use it to display several geometry layes that overlap or information such as measurement error.

As with other aesthetic parameters, you can Alpha parameter set or you can map them to the seleted variable from the dataset. If you want to setup transparency, in the context-menu you can find help functions and features.

Apha value can be defined in two ways. You can set it as a decimal number between 0 (fully transparent) and 1 (fully opaque). The second way is to set it as a fraction. If you want to use fraction, write is in the following form:

I(1/5)

In this case, the value is set to one-fifth of the value. Fractional values are appropriate if you have the data visualization with very large amounts of geometry objects (e.g. points) and you want to show their density (using the transparency). For very large number of overlapping objects, you can set the alpha as fraction in range 1/50 to 1/500. The following figure shows an example of the alpha value changes if you use a very large number of points.

When the alpha aesthetic is maped to variable from the dataset, you can use as continuous as well as categorical values. The following example shows the use of cyl variable from the mtcars dataset for definition of point alpha property.

As in previous cases, you can use for mapping selected variable, its transformation or also combination of several dataset variables. On the other hand, you must take into account that the alpha aesthetic property has low recognisability and its use is appropriate for continual scales or at a very small number of categorical values.