[Thread Prev][Thread Next][Index]

Re: Graticule



Tony,

Ferret's default plotting style is the same as plate_caree but with the axes stretched so as to give a standard aspect ratio for the entire plot (labels included).  If you
set win/aspect=#:ax
(#=latitude_range/longitude_range) you will be able to use the /GRATICULE qualifier and get a plot that is similar to one you could generate with mp_plate_caree and the three argument PLOT command.


-- Jon

Ansley Manke wrote:
Hi Tony,
The /graticule qualifier is probably the best answer for you, unless you
really want to use a map projection. When you use /GRATICULE on the
plot commands, it puts the lines at all of the large tics on the axes.  Use the
PPL XAXIS and YAXIS commands to set the tic interval.

   fill/graticule/set my_var
   ppl xaxis 200,360,10
   ppl yaxis -30,30,10
   ppl fill

! contour/levels , with no arguments to /levels,  uses the same
! levels as used in the previous FILL command.
   contour/nolab/overlay/levels my_var 
   go fland 5


The mp_graticule script works only if you have called the plot commands
as curvilinear plots, with three arguments. The script  mp_graticule.jnl is
expecting the plot to be in the page coordinates defined by the projection
defined by mp_plate_caree.jnl, not  latitude-longitude coordinates.

   ...

   go mp_plate_caree

   fill/nolab/levels=(($ppl$zmin))($8,$9,$11)(($ppl$zmin)) $12, x_page,y_page

   ! plot memoire des contours
    contour/nolab/overlay/levels=($8,$9,$13) $12, x_page, y_page

   ! masque de Terre
    go mp_fland 5

   ! grille lon-lat
    go mp_graticule $2 $3 10 $4 $5 10


In this plotting mode, you lose the latitude-longitude labels on the axes, and you
would need to use label commands to put them on individually (as in the script
mp_stereo_demo.jnl, which is explained in the FAQ on creating publication-
quality map projection plots:
http://www.ferret.noaa.gov/Ferret/FAQ/custom_plots/polar_stereographic.html

Tony Jolibois wrote:
          Hi all,

I want to plot graticules on a plot with an interval of 10° between each line (on X and Y).
I searched the documentation and found the script mp_graticule.jnl, but can not make it work correctly.
Here is my script :

! Script ferret pour la generation de cartes sur des variables 2D et 3D couleur
! Arguments :
!       1 -             data
!       2,3,4,5,6 -     x_min,x_max_y_min,y_max,z
!       7,8,9,10,11 -   level_min, min, max, level_max, step
!       12 -            variable
!       13              step contour
                                                                                                                                                                      ; ;               
cancel mode verify
cancel mode interp
set mem/size=127
cancel data/all
                                                                                                                                                                      ; ;               
set data "$1"
                                                                                                                                                                      ; ;               
set region/x=$2:$3/y=$4:$5/z=$6
                                                                                                                                                                      ; ;               
! Projection geographique
set grid $12
go mp_plate_caree
go mp_aspect
                                                                                                                                                                      ; ;               
fill/nolabs/nokey $12
                                                                                                                                                                      ; ;               
! plot memoire du champ
fill/nolab/levels=(($ppl$zmin))($8,$9,$11)(($ppl$zmin))/set_up $12;
                                                                                                                                                                      ; ;               
! plot reel (ou display ou ps si ferret est lance en batch ps)
ppl fill
                                                                                                                                                                      ; ;               
! plot memoire des contours
!contour/GRAT=(line,COLOR=black)/nolab/overlay/levels=($8,$9,$13) $12
contour/nolab/overlay/levels=($8,$9,$13) $12
                                                                                                                                                                      ; ;               
! masque de Terre
go fland 5
                                                                                                                                                                      ; ;               
! grille lon-lat
go mp_graticule $2 $3 10 $4 $5 10

With ferret v5.6 there  is the mode graticule, but can I specify the interval between each line ?

Thanks in advance for the help.
Tony
                                                                                                                                                           &nbs p; &nb sp;                      


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement