prop_to_size

Contents

prop_to_size#

graph_tool.draw.prop_to_size(prop, mi=0, ma=5, log=False, power=0.5)[source]#

Convert property map values to be more useful as a vertex size, or edge width. The new values are taken to be

\[y_i = mi + (ma - mi) \left(\frac{x_i - \min(x)} {\max(x) - \min(x)}\right)^\text{power}\]

If log=True, \(x_i\) is replaced with \(\ln(x_i)\).

If \(\max(x) - \min(x)\) is zero, \(y_i = mi\).