bb = ss.map(sim => vl
.markLine({interpolate: 'step-before', opacity: 0.3, strokeWidth: 0.8})
.data(sim)
.transform(
vl.groupby(["similarity","facet"]).aggregate(vl.count().as('Count')),
vl.window(vl.sum('Count').as('Cumulative_Sum')).sort(vl.field("similarity"))
)
.encode(
vl.y().fieldQ("similarity").title('Similarity (jaccard index)'),
vl.x().fieldQ('Cumulative_Sum').title('Cumulative Count of Probes'),
vl.color().fieldN('facet').title(facetParm)
)
);