I have some samples of a random variable, and I want to plot their cdf. What’s the best way to do this?

I have currently tried:

```
g1 = [E(λ) for i = 1:n] # generate the samples
using StatsBase
cdf = ecdf(g1)
xs = 0:10^-3:5
display(plot(y = [cdf(i) for i in xs], x = xs) #gadfly
```

But this seems rather unidiomatic and inelegant. Any better ideas? Also, this only works for continuous variables, I think.