Skip to content

Instantly share code, notes, and snippets.

View hamishmorgan's full-sized avatar

Hamish Morgan hamishmorgan

  • Shopify
  • Brighton, England
  • 09:00 (UTC -12:00)
View GitHub Profile
@hamishmorgan
hamishmorgan / gist:3342260
Created August 13, 2012 16:14
A quick demo of how to produce a loglog histogram plot of very large amounts of data, by using log-histogram bins.
# A quick demo of how to produce a loglog histogram plot of very large
# amounts of data, by using log-histogram bins
import numpy as np
import matplotlib.pyplot as plt
import itertools as it
# We shall draw millions of samples from a Zipf distribution. Using linear
# bins this is too much data for a fast and attactive plot.