changeset 169:28c0e0b2ac94

can overlay the two
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Fri, 03 Nov 2023 19:05:54 +0000
parents f95858689037
children 4870e14ec237
files lib/python/cc/lmh/plots.py
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /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')