Mercurial > hg > cc > cirrus_work
changeset 206:7179c83f32ea
support semilogy from cmd line
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Thu, 07 Dec 2023 18:15:43 +0000 |
parents | 5e050e313f8f |
children | a9fc62aa56e7 |
files | lib/python/cc/lmh/plots.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/python/cc/lmh/plots.py Wed Dec 06 13:36:49 2023 +0000 +++ b/lib/python/cc/lmh/plots.py Thu Dec 07 18:15:43 2023 +0000 @@ -7,10 +7,12 @@ import numpy as np from numpy import loadtxt -def counts(yy_file,title1,title2,**kargs): +def counts(yy_file,title1,title2,semiLog=False,**kargs): '''Plot number of responses with LM against year''' yy = loadtxt(yy_file,delimiter='\t') plt.title("%s based on LastModified data from %s"%(title1,title2)) + if semiLog: + plt.semilogy() plt.plot(yy[0:,0],yy[0:,1],color='red') plt.show()