0

I have the following simplified data from csv

owner    num_object_owned
A        120
B        110
C        90
D        30
E        20
...
Z        1 

I want to plot a cdf curve to show whether object ownership is dominated by a few owners or is it spread out.

library(ggplot2)
df <- as.data.frame(myData)
ggplot(df, aes(x=num_object_owned))+ 
  stat_ecdf(geom = "step")+
  labs(x = "Number of object hosted")+
  theme_classic()

I got the below graph:

enter image description here

I think I have not plotted correctly, because the x-axis should show the accumulated total number of objects owned right? Or should the x-axis show the owners instead?

hydradon
  • 1,316
  • 1
  • 21
  • 52

0 Answers0