Skip to content
Prev 132468 / 398506 Next

want to make a plot similar to ecdf

This should give you what you want:

 x <- scan(textConnection("0.00000000   2.39722222   4.35000000
-4.19722222   0.63611111
 1.08055556   5.90555556  -1.87222222   2.13333333  -1.18055556
  3.61666667   0.87777778   8.33888889   3.84166667   1.11111111
 -3.76111111 -11.67777778  -2.03055556   6.94444444 -11.76666667
  4.81111111  -7.25833333   1.42222222   5.37222222   4.68055556
  0.69166667  -5.36944444   5.35555556   4.26944444   6.14722222
  0.42500000   2.90555556  11.74166667   5.99444444   3.60555556
 -2.18333333   2.07777778  -9.79722222   7.26111111   4.50277778
  0.84722222   0.42222222   1.01388889  -0.04722222   5.03611111
  0.26666667   0.10555556   1.01666667   5.65833333   4.11111111
  0.23055556   8.53611111   4.42222222   4.93055556  13.41111111
  0.00000000   0.00000000  13.37500000   1.52500000   6.35833333"), what=0)
x <- sort(x)
plot(x, cumsum(rep(1, length(x))), type='s')
On Dec 19, 2007 7:26 AM, gallon li <gallon.li at gmail.com> wrote: