Hi--
I don't know if you've heard back from other folks, but I think you
are on the right track. The trick is to get your SET and GRIDAL calls
right.
I have modified example ccpga below so that it draws a plot that is
logarithmic in the Y direction. Hope this helps,
--Juli Rew, SCD Consulting
PROGRAM CCPGA
C
C Define error file, Fortran unit number, and workstation type,
C and workstation ID.
C
PARAMETER (IERRF=6, LUNIT=2, IWTYPE=1, IWKID=1)
PARAMETER (K=30,N=30,LRWK=1000,LIWK=1000)
REAL Z(K,N), RWRK(LRWK)
INTEGER IWRK(LIWK)
CALL GETDAT (Z, K, M, N)
C
C Open GKS, open and activate a workstation.
C
CALL GOPKS (IERRF, ISZDM)
CALL GOPWK (IWKID, LUNIT, IWTYPE)
CALL GACWK (IWKID)
C
C Turn clipping off
C
CALL GSCLIP (0)
* using call setusv doesn't scale right, and left labels gone
* make viewport slightly smaller so labels will fit
CALL SET (.1,.9,.1,.9,2.,20.,0.0001,.01,2)
* tell conpack not to call set because you have set it yourself
call cpseti('SET',0)
C
C Set X and Y min and max values
C
CALL CPSETR ('XC1 - X COORDINATE AT INDEX 1',2.0)
CALL CPSETR ('XCM - X COORDINATE AT INDEX M',20.0)
CALL CPSETR ('YC1 - Y COORDINATE AT INDEX 1',0.0001)
CALL CPSETR ('YCN - Y COORDINATE AT INDEX N',.01)
C
C Initialize Conpack
C
CALL CPRECT(Z,K,M,N,RWRK,LRWK,IWRK,LIWK)
C
C Draw and label perimeter
C
CALL LABMOD('(E3.2)','(E3.2)',0,0,10,10,0,0,1)
* since this particular data is over a fairly narrow range
* we can only get one tick mark in on the Y (log) axis,
* which is the third parameter
CALL GRIDAL(K-1,0,1,0,1,1,5,0.,0.)
C Draw Contours
CALL CPCLDR(Z,RWRK,IWRK)
C Close frame and close GKS
C
CALL FRAME
C
C Deactivate and close workstation, close GKS.
C
CALL GDAWK (IWKID)
CALL GCLWK (IWKID)
CALL GCLKS
STOP
END
SUBROUTINE GETDAT (Z, K, M, N)
INTEGER I,J,K,M,N
REAL Z(K,N)
M=K
DO 10, I=1,M
DO 20, J=1,N
Z(I,J)= 10.E-5*(-16.*REAL(I**2*J) +
1 34*REAL(I*J**2) - REAL(6*I) + 93.)
20 CONTINUE
10 CONTINUE
RETURN
END
> From: Bernard Miville <acrnrbm@ec.gc.ca>
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Date: Thu, 31 May 2001 13:45:51 -0700
> To: ncarg-talk@UCAR.EDU
Approved: glamour-group
> Subject: Log Y-Axis
> CC: acrnrbm@ec.gc.ca
> Content-Transfer-Encoding: 7bit
>
>
> Hi,
>
> I am using LLU to do contours. I need to have the Y-Axis on a
> Logaritmic scale. I tried the following:
>
> CALL SETUSV('LS',2)
>
> and
>
> CALL SET (0.,1.,0.,1.,0.,1.,0.,1.,2)
>
>
> none worked for me.
>
> With SETUSV('LS',2) it removes my label on both axis and removes the
> thick marks on the Y-axis and puts a 10 on top. The data contours are
> unaffected.
>
>
> To contour I am using:
>
> CALL ARINAM (IAMA,800000)
> CALL CPRECT (ZREG,M,M,K,RWRK,10000,IWRK,12000)
> CALL CPLBAM (ZREG,RWRK,IWRK,IAMA)
> CALL CPCLDM (ZREG,RWRK,IWRK,IAMA,CPDRPL)
> CALL CPLBDR (ZREG,RWRK,IWRK)
>
> the axis mapping:
>
> CALL CPSETR ('XC1 - X COORDINATE AT I=1',X1)
> CALL CPSETR ('XCM - X COORDINATE AT I=M',XM)
> CALL CPSETR ('YC1 - Y COORDINATE AT J=1',Y1)
> CALL CPSETR ('YCN - Y COORDINATE AT J=N',YN)
>
>
> and for labeling the axis:
>
> CALL GASETI('LTY',1)
> CALL GASETI('WLB',2)
> CALL LABMOD ('(I4)','(I4)',0,0,10,10,0,0,0)
> CALL GRIDAL (5,5,4,4,1,1,5,0.,0.)
>
>
> all the contour levels and text labels have been set up prior to these
> calls. I works fine for linear to linear but the log scaling does not work
> for me.
>
> By scaling the Y axis to log will the data contour follow or it only
> changes the "look" of the Y-axis?
>
>
> What am I doing wrong?
>
>
> Any help would be appreciated.
>
>
> Thank you
>
>
> Bernard
>
> --
> ----------------------------------------------------------------------
> Bernard Miville - Meteorologist
> Canadian Centre for Climate Phone: 1-250-363-3347
> Modelling and Analysis (CCCMA) Fax: 1-250-363-8247
> Meteorological Service of Canada E-mail: Bernard.Miville@ec.gc.ca
> University of Victoria Web: http://www.cccma.bc.ec.gc.ca
> Post: Courier:
> P.O. Box 1700 3964 Gordon Head Road, #283
> Victoria, B.C. V8W 2Y2 Victoria, B.C. V8N 3X3
> ----------------------------------------------------------------------
>
> From ncarg-talk-owner@ncar.UCAR.EDU Thu May 31 21:39:53 2001
> Received: from ncar.UCAR.EDU (ncar.ucar.edu [128.117.64.4])
> by niwot.scd.ucar.edu (8.9.1a/8.9.1) with ESMTP id VAA22934;
> Thu, 31 May 2001 21:39:53 -0600 (MDT)
> Received: (from majordom@localhost)
> by ncar.UCAR.EDU (8.9.1a/) id VAA00598
> for ncrg-tlk-tgng; Thu, 31 May 2001 21:33:03 -0600 (MDT)
> Received: from niwot.scd.ucar.edu (niwot.scd.ucar.edu [128.117.8.223])
> by ncar.UCAR.EDU (8.9.1a/) with ESMTP id VAA00594
> for <ncarg-talk@ucar.edu>; Thu, 31 May 2001 21:33:01 -0600 (MDT)
> Received: (from ncargt@localhost)
> by niwot.scd.ucar.edu (8.9.1a/8.9.1) id VAA22597
> for ncarg-talk@ucar.edu; Thu, 31 May 2001 21:33:01 -0600 (MDT)
> Received: from mailhost.cccma.bc.ec.gc.ca (cccfw2.seos.uvic.ca
[142.104.11.62])
> by ncar.UCAR.EDU (8.9.1a/) with ESMTP id OAA11356
> for <ncarg-talk@UCAR.EDU>; Thu, 31 May 2001 14:45:54 -0600 (MDT)
> Received: from ws03.cccma.bc.ec.gc.ca (ws03.cccma.bc.ec.gc.ca
[131.235.157.113])
> by mailhost.cccma.bc.ec.gc.ca (8.9.1a/8.9.1) with ESMTP id NAA27350;
> Thu, 31 May 2001 13:45:53 -0700
> Received: (from acrnrbm@localhost)
> by ws03.cccma.bc.ec.gc.ca (8.9.1a/8.9.1) id NAA26934;
> Thu, 31 May 2001 13:45:52 -0700
> From: Bernard Miville <acrnrbm@ec.gc.ca>
> MIME-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> Message-ID: <15126.44415.491380.873843@ws03.cccma.bc.ec.gc.ca>
> Date: Thu, 31 May 2001 13:45:51 -0700
> To: ncarg-talk@UCAR.EDU
> Subject: Log Y-Axis
> X-Mailer: VM 6.89 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid
> CC: acrnrbm@ec.gc.ca
> Content-Transfer-Encoding: 7bit
> Sender: owner-ncarg-talk@UCAR.EDU
> Precedence: junk
> Content-Length: 1972
> Status: OR
>
>
> Hi,
>
> I am using LLU to do contours. I need to have the Y-Axis on a
> Logaritmic scale. I tried the following:
>
> CALL SETUSV('LS',2)
>
> and
>
> CALL SET (0.,1.,0.,1.,0.,1.,0.,1.,2)
>
>
> none worked for me.
>
> With SETUSV('LS',2) it removes my label on both axis and removes the
> thick marks on the Y-axis and puts a 10 on top. The data contours are
> unaffected.
>
>
> To contour I am using:
>
> CALL ARINAM (IAMA,800000)
> CALL CPRECT (ZREG,M,M,K,RWRK,10000,IWRK,12000)
> CALL CPLBAM (ZREG,RWRK,IWRK,IAMA)
> CALL CPCLDM (ZREG,RWRK,IWRK,IAMA,CPDRPL)
> CALL CPLBDR (ZREG,RWRK,IWRK)
>
> the axis mapping:
>
> CALL CPSETR ('XC1 - X COORDINATE AT I=1',X1)
> CALL CPSETR ('XCM - X COORDINATE AT I=M',XM)
> CALL CPSETR ('YC1 - Y COORDINATE AT J=1',Y1)
> CALL CPSETR ('YCN - Y COORDINATE AT J=N',YN)
>
>
> and for labeling the axis:
>
> CALL GASETI('LTY',1)
> CALL GASETI('WLB',2)
> CALL LABMOD ('(I4)','(I4)',0,0,10,10,0,0,0)
> CALL GRIDAL (5,5,4,4,1,1,5,0.,0.)
>
>
> all the contour levels and text labels have been set up prior to these
> calls. I works fine for linear to linear but the log scaling does not work
> for me.
>
> By scaling the Y axis to log will the data contour follow or it only
> changes the "look" of the Y-axis?
>
>
> What am I doing wrong?
>
>
> Any help would be appreciated.
>
>
> Thank you
>
>
> Bernard
>
> --
> ----------------------------------------------------------------------
> Bernard Miville - Meteorologist
> Canadian Centre for Climate Phone: 1-250-363-3347
> Modelling and Analysis (CCCMA) Fax: 1-250-363-8247
> Meteorological Service of Canada E-mail: Bernard.Miville@ec.gc.ca
> University of Victoria Web: http://www.cccma.bc.ec.gc.ca
> Post: Courier:
> P.O. Box 1700 3964 Gordon Head Road, #283
> Victoria, B.C. V8W 2Y2 Victoria, B.C. V8N 3X3
> ----------------------------------------------------------------------
>
>
> From ncarg-talk-owner@ncar.UCAR.EDU Fri Jun 1 15:09:16 2001
> Received: from ncar.UCAR.EDU (ncar.ucar.edu [128.117.64.4])
> by niwot.scd.ucar.edu (8.9.1a/8.9.1) with ESMTP id PAA02061;
> Fri, 1 Jun 2001 15:09:15 -0600 (MDT)
> Received: (from majordom@localhost)
> by ncar.UCAR.EDU (8.9.1a/) id PAA26959
> for ncrg-tlk-tgng; Fri, 1 Jun 2001 15:00:20 -0600 (MDT)
> Received: from niwot.scd.ucar.edu (niwot.scd.ucar.edu [128.117.8.223])
> by ncar.UCAR.EDU (8.9.1a/) with ESMTP id PAA26954
> for <ncarg-talk@ucar.edu>; Fri, 1 Jun 2001 15:00:18 -0600 (MDT)
> Received: (from ncargt@localhost)
> by niwot.scd.ucar.edu (8.9.1a/8.9.1) id PAA01009
> for ncarg-talk@ucar.edu; Fri, 1 Jun 2001 15:00:18 -0600 (MDT)
> Received: from mailhost.cccma.bc.ec.gc.ca (cccfw2.seos.uvic.ca
[142.104.11.62])
> by ncar.UCAR.EDU (8.9.1a/) with ESMTP id OAA11356
> for <ncarg-talk@UCAR.EDU>; Thu, 31 May 2001 14:45:54 -0600 (MDT)
> Received: from ws03.cccma.bc.ec.gc.ca (ws03.cccma.bc.ec.gc.ca
[131.235.157.113])
> by mailhost.cccma.bc.ec.gc.ca (8.9.1a/8.9.1) with ESMTP id NAA27350;
> Thu, 31 May 2001 13:45:53 -0700
> Received: (from acrnrbm@localhost)
> by ws03.cccma.bc.ec.gc.ca (8.9.1a/8.9.1) id NAA26934;
> Thu, 31 May 2001 13:45:52 -0700
> From: Bernard Miville <acrnrbm@ec.gc.ca>
> MIME-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> Message-ID: <15126.44415.491380.873843@ws03.cccma.bc.ec.gc.ca>
> Date: Thu, 31 May 2001 13:45:51 -0700
> To: ncarg-talk@UCAR.EDU
> Subject: Log Y-Axis
> X-Mailer: VM 6.89 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid
> CC: acrnrbm@ec.gc.ca
> Content-Transfer-Encoding: 7bit
> Sender: owner-ncarg-talk@UCAR.EDU
> Precedence: junk
> Content-Length: 5671
> Status: OR
>
>
> Hi,
>
> I am using LLU to do contours. I need to have the Y-Axis on a
> Logaritmic scale. I tried the following:
>
> CALL SETUSV('LS',2)
>
> and
>
> CALL SET (0.,1.,0.,1.,0.,1.,0.,1.,2)
>
>
> none worked for me.
>
> With SETUSV('LS',2) it removes my label on both axis and removes the
> thick marks on the Y-axis and puts a 10 on top. The data contours are
> unaffected.
>
>
> To contour I am using:
>
> CALL ARINAM (IAMA,800000)
> CALL CPRECT (ZREG,M,M,K,RWRK,10000,IWRK,12000)
> CALL CPLBAM (ZREG,RWRK,IWRK,IAMA)
> CALL CPCLDM (ZREG,RWRK,IWRK,IAMA,CPDRPL)
> CALL CPLBDR (ZREG,RWRK,IWRK)
>
> the axis mapping:
>
> CALL CPSETR ('XC1 - X COORDINATE AT I=1',X1)
> CALL CPSETR ('XCM - X COORDINATE AT I=M',XM)
> CALL CPSETR ('YC1 - Y COORDINATE AT J=1',Y1)
> CALL CPSETR ('YCN - Y COORDINATE AT J=N',YN)
>
>
> and for labeling the axis:
>
> CALL GASETI('LTY',1)
> CALL GASETI('WLB',2)
> CALL LABMOD ('(I4)','(I4)',0,0,10,10,0,0,0)
> CALL GRIDAL (5,5,4,4,1,1,5,0.,0.)
>
>
> all the contour levels and text labels have been set up prior to these
> calls. I works fine for linear to linear but the log scaling does not work
> for me.
>
> By scaling the Y axis to log will the data contour follow or it only
> changes the "look" of the Y-axis?
>
>
> What am I doing wrong?
>
>
> Any help would be appreciated.
>
>
> Thank you
>
>
> Bernard
>
> --
> ----------------------------------------------------------------------
> Bernard Miville - Meteorologist
> Canadian Centre for Climate Phone: 1-250-363-3347
> Modelling and Analysis (CCCMA) Fax: 1-250-363-8247
> Meteorological Service of Canada E-mail: Bernard.Miville@ec.gc.ca
> University of Victoria Web: http://www.cccma.bc.ec.gc.ca
> Post: Courier:
> P.O. Box 1700 3964 Gordon Head Road, #283
> Victoria, B.C. V8W 2Y2 Victoria, B.C. V8N 3X3
> ----------------------------------------------------------------------
>
> From ncarg-talk-owner@ncar.UCAR.EDU Thu May 31 21:39:53 2001
> Received: from ncar.UCAR.EDU (ncar.ucar.edu [128.117.64.4])
> by niwot.scd.ucar.edu (8.9.1a/8.9.1) with ESMTP id VAA22934;
> Thu, 31 May 2001 21:39:53 -0600 (MDT)
> Received: (from majordom@localhost)
> by ncar.UCAR.EDU (8.9.1a/) id VAA00598
> for ncrg-tlk-tgng; Thu, 31 May 2001 21:33:03 -0600 (MDT)
> Received: from niwot.scd.ucar.edu (niwot.scd.ucar.edu [128.117.8.223])
> by ncar.UCAR.EDU (8.9.1a/) with ESMTP id VAA00594
> for <ncarg-talk@ucar.edu>; Thu, 31 May 2001 21:33:01 -0600 (MDT)
> Received: (from ncargt@localhost)
> by niwot.scd.ucar.edu (8.9.1a/8.9.1) id VAA22597
> for ncarg-talk@ucar.edu; Thu, 31 May 2001 21:33:01 -0600 (MDT)
> Received: from mailhost.cccma.bc.ec.gc.ca (cccfw2.seos.uvic.ca
[142.104.11.62])
> by ncar.UCAR.EDU (8.9.1a/) with ESMTP id OAA11356
> for <ncarg-talk@UCAR.EDU>; Thu, 31 May 2001 14:45:54 -0600 (MDT)
> Received: from ws03.cccma.bc.ec.gc.ca (ws03.cccma.bc.ec.gc.ca
[131.235.157.113])
> by mailhost.cccma.bc.ec.gc.ca (8.9.1a/8.9.1) with ESMTP id NAA27350;
> Thu, 31 May 2001 13:45:53 -0700
> Received: (from acrnrbm@localhost)
> by ws03.cccma.bc.ec.gc.ca (8.9.1a/8.9.1) id NAA26934;
> Thu, 31 May 2001 13:45:52 -0700
> From: Bernard Miville <acrnrbm@ec.gc.ca>
> MIME-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> Message-ID: <15126.44415.491380.873843@ws03.cccma.bc.ec.gc.ca>
> Date: Thu, 31 May 2001 13:45:51 -0700
> To: ncarg-talk@UCAR.EDU
> Subject: Log Y-Axis
> X-Mailer: VM 6.89 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid
> CC: acrnrbm@ec.gc.ca
> Content-Transfer-Encoding: 7bit
> Sender: owner-ncarg-talk@UCAR.EDU
> Precedence: junk
> Content-Length: 1972
> Status: OR
>
>
> Hi,
>
> I am using LLU to do contours. I need to have the Y-Axis on a
> Logaritmic scale. I tried the following:
>
> CALL SETUSV('LS',2)
>
> and
>
> CALL SET (0.,1.,0.,1.,0.,1.,0.,1.,2)
>
>
> none worked for me.
>
> With SETUSV('LS',2) it removes my label on both axis and removes the
> thick marks on the Y-axis and puts a 10 on top. The data contours are
> unaffected.
>
>
> To contour I am using:
>
> CALL ARINAM (IAMA,800000)
> CALL CPRECT (ZREG,M,M,K,RWRK,10000,IWRK,12000)
> CALL CPLBAM (ZREG,RWRK,IWRK,IAMA)
> CALL CPCLDM (ZREG,RWRK,IWRK,IAMA,CPDRPL)
> CALL CPLBDR (ZREG,RWRK,IWRK)
>
> the axis mapping:
>
> CALL CPSETR ('XC1 - X COORDINATE AT I=1',X1)
> CALL CPSETR ('XCM - X COORDINATE AT I=M',XM)
> CALL CPSETR ('YC1 - Y COORDINATE AT J=1',Y1)
> CALL CPSETR ('YCN - Y COORDINATE AT J=N',YN)
>
>
> and for labeling the axis:
>
> CALL GASETI('LTY',1)
> CALL GASETI('WLB',2)
> CALL LABMOD ('(I4)','(I4)',0,0,10,10,0,0,0)
> CALL GRIDAL (5,5,4,4,1,1,5,0.,0.)
>
>
> all the contour levels and text labels have been set up prior to these
> calls. I works fine for linear to linear but the log scaling does not work
> for me.
>
> By scaling the Y axis to log will the data contour follow or it only
> changes the "look" of the Y-axis?
>
>
> What am I doing wrong?
>
>
> Any help would be appreciated.
>
>
> Thank you
>
>
> Bernard
>
> --
> ----------------------------------------------------------------------
> Bernard Miville - Meteorologist
> Canadian Centre for Climate Phone: 1-250-363-3347
> Modelling and Analysis (CCCMA) Fax: 1-250-363-8247
> Meteorological Service of Canada E-mail: Bernard.Miville@ec.gc.ca
> University of Victoria Web: http://www.cccma.bc.ec.gc.ca
> Post: Courier:
> P.O. Box 1700 3964 Gordon Head Road, #283
> Victoria, B.C. V8W 2Y2 Victoria, B.C. V8N 3X3
> ----------------------------------------------------------------------
>
>
>
-----------------------------------------------------------------------
Juliana Rew, Technical Consulting Group (juliana@ucar.edu)
Sci. Computing Div./Nat'l Ctr. for Atmos. Research
P.O. Box 3000, Boulder, CO 80307-3000 USA
http://www.scd.ucar.edu/staff/juliana voice: (303) 497-1830
-----------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Wed Jun 06 2001 - 08:52:36 MDT