From 4edf019d31293b50d5003ea7ea02dba7f4959596 Mon Sep 17 00:00:00 2001 From: Cezary Czaplewski Date: Sat, 30 Sep 2017 18:53:09 +0200 Subject: [PATCH] histogram bins='auto' --- TODO | 11 +++++++---- files/matplotlib_hist.py | 6 +++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/TODO b/TODO index 62d6774..0740ce8 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,5 @@ +clean code and combine piasek and etoh versions +make easy install on any system with pbs add javascript instead of separate forms check input pdb for: unknown residues, @@ -5,11 +7,12 @@ check input pdb for: max number of dissulfides (30), etc, and display error -check input for other errors (sequence. ?) +check input for other errors (sequence ?) add web viewer NGL WebGL dynamic dissulfides input - all and selected cys -homology restraints -MREMD - add cluster parameters, change after run and rerun analysis +homology restraints input +other restrains input +MREMD - add cluster parameters, change after run and rerun only cluster analysis - button to make movie from selected trajectory after run examples+gallery -documentation \ No newline at end of file +documentation diff --git a/files/matplotlib_hist.py b/files/matplotlib_hist.py index 2c54ebe..c37a5f6 100755 --- a/files/matplotlib_hist.py +++ b/files/matplotlib_hist.py @@ -19,10 +19,10 @@ else: x,y,s,r= np.loadtxt('remd_all.stat',usecols=(7,3,0,9),unpack=True) x0,s0,r0= np.loadtxt('remd_all0.stat',usecols=(7,0,9),unpack=True) -hall,binall=np.histogram(y,bins=40,density=False) +hall,binall=np.histogram(y,bins='auto',density=False) plt.xlim(min(binall), max(binall[hall>4])) -plt.ylim(0,max(hall)/4) +#plt.ylim(0,max(hall)/4) plt.ylabel('number of samples') plt.xlabel('potential energy [kcal/mol]') @@ -34,7 +34,7 @@ Tremd=map(float,sys.argv[1].split()) colors = cm.rainbow(np.linspace(0, 1, len(Tremd))) for T,c in zip(Tremd,colors): yt=y[x==T] - h,bin=np.histogram(yt,bins=40,density=False) + h,bin=np.histogram(yt,bins='auto',density=False) center = (bin[:-1] + bin[1:]) / 2 plt.plot(center,h,'-',color=c) # plt.bar(bin[:-1], h, width = bin[2]-bin[1],color=c) -- 1.7.9.5