Right now you’re plotting your data as y vs log(x). If you plot your data points on a log-log scale (log(y) vs log(x)) you’ll be able to fit a linear function to it, since it’ll appear as a straight line (as per Zipf’s law). That will allow you to find the slope