[Thread Prev][Thread Next][Index]

Re: set color of contoue lines



Hi Gao Rongzhen,
                  The demo files in ferret/examples dir illustrates the
different options available with ferret and their usage. For contouring
purpose, please have a trial with the demo file "custom_contour_demo.jnl".

       yes? go custom_contour_demo

  The "LINE" sub-qualifier with "LEVELS" will work only with "CONTOUR/FILL"
(or with the alias "FILL"). So with just the command "CONTOUR" the "LINE"
qualifier will be ignored. Instead you can use "PEN" to control the color.
Have a look at the example below.

Hope This Helps

With Regards

Jaison

!----------------example.jnl----------------
\cancel mode verify
!
! create a 2-D variable : from custom_contour_demo.jnl

     define axis/x=-20:20:1 x2020
     define axis/y=-20:20:1 y2020
     define grid/x=x2020/y=y2020 g2020
     set grid g2020
     let circle = (x^2 + y^2) ^ 0.5
     let/title="SAMPLE FUNCTION" my_var = circle * exp((10-(i+j))/50)-10

! different options with CONTOUR command

   ! the LINE qualifier in this case will be ignored
     cont /lev="(-10,20,1),line(1,20,1,2),dash(-10,-1,1,4)" my_var
     pause

   ! the default way
     cont/lev=(-10,20,1) my_var
     pause

   ! +ve values in RED solid lines & zero and -ve values in BLUE dashed lines
     cont/lev="(-10,20,1,-1) PEN(-10,0,1,4) PEN(1,20,1,2) DASH(-10,0,1)" my_var
     pause

   ! +ve values in RED solid lines, -ve values in BLUE dashed lines &
   !       zero in BLACK thick line
     cont/lev="(-10,20,1,-1) PEN(-10,-1,1,4) PEN(1,20,1,2) PEN(0,0,1,7) DASH(-10,-1,1)" my_var

!-------------------------end of example.jnl----------------------------

On Sun, 8 May 2005, Gao wrote:

Hi Ferreters,

Now i have a problem about color of contour lines. What i want is values above 0 is red solid line, and below 0 is blue dashed line. But i used the following script the color argument doesnot work. All the contour lines were black.How should i do?

def sym level3="(-30,30,3),line(0,30,3,2),dash(-30,0,3,4)"
contour/set/nolab/lev=($level3) flx


Thanks

Gao Rongzhen

--
___________________________________________________

    Jaison Kurian
    Centre for Atmospheric and Oceanic Sciences
    Indian Institute of Science
    B A N G A L O R E   560 012
    Ph: +91-80-22932505 Extn. 229
        +91-80-23600450
    Fax:+91-80-23600865
___________________________________________________

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement