[Thread Prev][Thread Next][Index]

Re: log-log contour



Hi Steve,

Thanks for your suggestion. It solves half the problem - what you would
really want in a publication-quality figure is the contours rescaled to
the log axes *and* the "ppl axtype 2,2"-style tic marks - that is, with
the ticks unevenly spaced, which is what people are used to seeing on
log-log plots. I've modified your solution in the following way to get
that effect: 

 ! suppose you have some data on a grid x=1:100:1, y=1:100:1
 define axis/x=1:100:1 xax
 define axis/y=1:100:1 yax
 define grid/x=xax/y=yax gg
 set grid gg
 let a = LOG(x/10)+y/100    ! some made up data
 
 ! plot untransformed data in the upper plot
 set view upper
 ppl axtype 1,1
 contour a
 
 ! define a new axis with the LOG transform of the X coordinates
 define axis/from/name=xlog/x LOG(x)
 
 ! plot LOG-transformed data in the lower plot
 set view lower
 ppl axtype 2,1
 contour a[gx=xlog@asn]*0
 ppl axtype 1,1
 contour/over/pen=1/nolab a[gx=xlog@asn]

It's a bit kludgy, but it works. Thanks,
Rodrigo

---

Rodrigo Caballero Augi 
DCESS, Juliane Maries Vej 30, DK-2100 Copenhagen O, Denmark.
tel: +45 35320565 | fax: +45 35365357 | home: +45 35836487
rca@gfy.ku.dk | http://rodrigo.gfy.ku.dk


On Thu, 18 Feb 1999, Steve Hankin wrote:

> Hi Rodrigo,
> 
> The LOG axis transforms (PPL AXTYPE) are not applicable to the 2D plots
> (CONTOUR,VECTOR,SHADE, and FILL).
> 
> Here is another way (by example) to achieve a similar result:
> 
>  ! suppose you have some data on a grid x=1:100:1, y=1:100:1
>  define axis/x=1:100:1 xax
>  define axis/y=1:100:1 yax
>  define grid/x=xax/y=yax gg
>  set grid gg
>  let a = LOG(x/8)+y/100    ! some made up data
>  
>  ! plot untransformed data in the upper plot
>  set view upper
>  contour a
>  
>  ! define a new axis with the LOG transform of the X coordinates
>  define axis/from/name=xlog/x LOG(x)
>  
>  ! plot LOG-transformed data in the lower plot
>  set view lower
>  contour a[gx=xlog@asn]
> 
> 
> Hope this helps.
> 
> 	Happy Ferreting - steve
> 



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement