Create a segment styling spec (alpha gradient).
Source:R/plot_styling.R
style_segment_alpha_gradient.RdThis helper describes a monotone alpha change along the segment
from alpha_1 (at x_1) to alpha_2 (at x_2). gamma controls how quickly
the transition happens (larger values concentrate the change towards one end).
Arguments
- alpha_1
Alpha at
x_1(segment start), single numeric value between 0 and 1.- alpha_2
Alpha at
x_2(segment end), single numeric value between 0 and 1.- gamma
Positive exponent controlling the alpha curve.
gamma > 1concentrates the change towardsx_2(flatter nearx_1), whilegamma < 1concentrates the change towardsx_1(steeper nearx_1).- n
Number of interpolation points when using
ggforce::geom_link().