In [1]:
%matplotlib inline
from ggplot import *
import pandas as pd

scale_alpha_identity

scale_alpha_identity applies the alpha values in your data to your ggplots.


In [3]:
ze_alpha = [
    0.2,
    0.3,
    0.4,
    0.9,
    0.8,
    0.65,
    0.43,
    0.55,
    0.34,
    0.65
]
df = pd.DataFrame({
        "x": range(10),
        "y": range(10),
        "ze-alpha": ze_alpha
    })
df


Out[3]:
x y ze-alpha
0 0 0 0.20
1 1 1 0.30
2 2 2 0.40
3 3 3 0.90
4 4 4 0.80
5 5 5 0.65
6 6 6 0.43
7 7 7 0.55
8 8 8 0.34
9 9 9 0.65

In [4]:
ggplot(df, aes(x='x', y='y', alpha='ze-alpha')) + \
    geom_point(size=7500) + \
    scale_alpha_identity()


Out[4]:
<ggplot: (285185805)>

In [ ]: