Dataviz in Python: Stephen Few’s new jittering

I am always excited to get news of a new Visual Business Intelligence Newsletter in my Inbox, and that is what arrived at the end of last week. This time Few takes on “jittering”, and suggests an interesting alternative to adding random noise.

Here is a little python snippet to do it:

def wheat_plot(x):
    hist, bin_edges = np.histogram(x)
    # make y position based on values of hist
    y = []
    for h_i in hist:
        y += range(h_i)

    plt.plot(sorted(x), y, 'o')

Here is a notebook that makes that code do something:

Also Jeff Heer and company made an interactive version in Vega:

Comments Off on Dataviz in Python: Stephen Few’s new jittering

Filed under Uncategorized

Comments are closed.