I am trying to plot the complementary cumulative distribution function (CCDF) using pgfplots. I found this answer Drawing cumulative distribution function for a discrete variable which plots only the CDF.
After reading the details in that answer I found this code create col/expr={\pgfmathaccuma + \thisrow{f(x)}} which as I understand calculates the cumulative sum of the row in f(x).
My problem is how to get the 1-CDF in this fourmla?
I tried using create col/expr={1 - \pgfmathaccuma - \thisrow{f(x)}} but it is wrong.