From e3f056e34ec297688df39e3c0a4b3957c56b2f41 Mon Sep 17 00:00:00 2001 From: Alessandro Ridolfi Date: Thu, 14 May 2026 19:54:50 +0200 Subject: [PATCH] Fix PGPOINT scalar/array mismatch in best.f and quickplot.f --- src/best.f | 6 +++++- src/quickplot.f | 17 +++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/best.f b/src/best.f index 099abd9..533d075 100644 --- a/src/best.f +++ b/src/best.f @@ -52,6 +52,8 @@ program best & xval(mg), yval(mg), gridmin, gridmax, deltax, deltay, & xx, yy, fcentre, chbandw,zval(mg) + real :: x1(1), y1(1) + integer trid(mc),cidx(mc),i,j,k,l,sidx(mc),nids(mc),ndm integer narg,iargc,fld(mc),nsus,nf,mode,ix,iy,gidx,iz,bb @@ -788,7 +790,9 @@ program best call pgpoint(ndm,x,y,17) else if (mode.eq.4.or.mode.eq.5) then call pggray(grid,mg,mg,1,ngx,1,ngy,gridmax,gridmin,tr) - call pgpoint(1,xx,yy,27) + x1(1) = xx + y1(1) = yy + call pgpoint(1,x1,y1,27) call pgsls(4) call pgmove(xmin,0.0) call pgdraw(xmax,0.0) diff --git a/src/quickplot.f b/src/quickplot.f index 01fa59b..174ae00 100644 --- a/src/quickplot.f +++ b/src/quickplot.f @@ -461,6 +461,7 @@ subroutine quickgrey(dat,nxd,nyd,nx,ny,flip) parameter(nsym=10) integer*4 ksym(nsym) real*4 dat(nxd,nyd) + real x1(1), y1(1) data ksym/1,20,21,2,3,14,15,17,16,18/ s=0. @@ -490,14 +491,14 @@ subroutine quickgrey(dat,nxd,nyd,nx,ny,flip) call pgwindow(1.0,real(nx),0.0,real(ny+1)) endif do j=1,ny - do i=1,nx - k=min(int((dat(i,j)-s)/rms),nsym) - if(k.gt.0)then - x=i - y=j - call pgpoint(1,x,y,ksym(k)) - endif - enddo + do i=1,nx + k = min(int((dat(i,j)-s)/rms), nsym) + if (k .gt. 0) then + x1(1) = i + y1(1) = j + call pgpoint(1, x1, y1, ksym(k)) + endif + enddo enddo return