Support for CDF?
Opened this issue · 1 comments
yjk21 commented
Great project!
Does it support generating cumulative distribution function plots, like in pyplot (e.g. https://matplotlib.org/examples/statistics/histogram_demo_cumulative.html)?
Thanks
mgoeminne commented
Hello,
I don't reckon the lib supports cdf, per se, but you can definitely plot something that looks like your figure.
For plotting survival estimates, I use something like
Vegas.layered("Kaplan-Meier")
.withDataFrame(cat_model)
.withLayers(
Layer()
.mark(Area)
.encodeX("event_at", axis=Axis(title=x_label))
.encodeY("lower_ci", axis=Axis(title="Survival"))
.encodeY2("upper_ci")
.encodeColor(category_name, Nominal)
.configMark(opacity=opacity, interpolate=StepBefore),
Layer()
.mark(Line)
.encodeX("event_at", Quant)
.encodeY("estimate", Quant)
.encodeColor(category_name, Nominal)
.configMark(interpolate=StepBefore)
)
So, basically, I use interpolate=StepBefore
for getting the "cdf effect".