# HG changeset patch # User Henry S. Thompson # Date 1699038354 0 # Node ID 28c0e0b2ac94d5721c647a1300f32cbf4f8ffeb9 # Parent f958586890374a389c24ead9ddcb94cfcfe1e57e can overlay the two diff -r f95858689037 -r 28c0e0b2ac94 lib/python/cc/lmh/plots.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/python/cc/lmh/plots.py Fri Nov 03 19:05:54 2023 +0000 @@ -0,0 +1,15 @@ +#!/usr/bin/python3 +''' Plots using LM data ''' + +import pylab +import matplotlib.pyplot as plt +import matplotlib +import numpy as np +from numpy import loadtxt + +def counts(yy_file,title,delimiter='\t'): + ''' Plot number of responses with LM against year''' + yy = loadtxt(yy_file,delimiter=delimiter) + plt.title("Number of responses in %s by year"%title) + plt.semilogy() + plt.plot(yy[0:,0],yy[0:,1],color='red')