From e3ddde01b4337675de13c74e3fea208916208034 Mon Sep 17 00:00:00 2001 From: Cees Bassa Date: Sun, 8 Jan 2023 12:08:33 +0100 Subject: [PATCH] Update autoscaling --- rfio.c | 2 +- rfplot.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/rfio.c b/rfio.c index c93fbf3..2fc4f5d 100644 --- a/rfio.c +++ b/rfio.c @@ -195,7 +195,7 @@ struct spectrogram read_spectrogram(char *prefix,int isub,int nsub,double f0,dou free(z); free(cz); - return s; + return s; } void write_spectrogram(struct spectrogram s,char *prefix) diff --git a/rfplot.c b/rfplot.c index 6a16b60..b15e2a9 100644 --- a/rfplot.c +++ b/rfplot.c @@ -55,7 +55,7 @@ int main(int argc,char *argv[]) float heat_g[] = {0.0, 0.0, 0.5, 1.0, 1.0}; float heat_b[] = {0.0, 0.0, 0.0, 0.3, 1.0}; float xmin,xmax,ymin,ymax,zmin,zmax=1.0; - int i,j,k,flag=0,sn; + int i,j,k,flag=0,sn,maxflag=0; int redraw=1,mode=0,posn=0,click=0,graves=0,grid=0; float dt,zzmax,s1,s2,z,za,sigma,zs,zm; int ix=0,iy=0,isub=0; @@ -144,6 +144,7 @@ int main(int argc,char *argv[]) case 'z': zmax=atof(optarg); + maxflag=1; break; case 'g': @@ -206,7 +207,9 @@ int main(int argc,char *argv[]) ymin=0.0; ymax=(float) s.nchan; zmin=0.0; - + if (maxflag==0) + zmax=s.zmax; + // Set trace tf.n=0;