[Thread Prev][Thread Next][Index]

Re: Plotting irregular data point-by-point



Hi Steve Guimond,
                    That can be easily done in Ferret with POLYGON command.
Have a trial with the example given below (use the attached ascii dataset,
scatter_data.dat). Please find the explanations in the example. If you need
any clarifications please let me know.

With Regards

Jaison

!---------------scatter_data.jnl-------------------
\ cancel mode verify
!
! define axis & grid for reading the ascii file
!
   define axis/y=1:80:1 yfile ; define grid/y=yfile  fgrid

   FILE/skip=1/grid=fgrid/var="lat,lon,temp" scatter_data.dat

!  define the box/polygon corners for filling (should be a different
!    axis than that of the variable's)
!    increase dxp & dyp to increase the "box/polygon" size

   let dxp=0.65 ; let bx=xsequence({`(-1)*dxp`,`dxp`,`dxp`,`(-1)*dxp`})
   let dzp=0.65 ; let bz=xsequence({`dzp`,`dzp`,`(-1)*dzp`,`(-1)*dzp`})

! set reg will lead to errors..so use /VLIM & /HLIM to select desired region
!  Please note that here the fill plot is actually made for whole data so
!  we need to fix /LEVELS to get resonable range for the color key.

   polygon/hlim=40:110:5/vlim=-15:25:5/levels=(22,30,0.25)/set bx+lon,bz+lat,temp

   ppl title "My Scatter Plot"
   ppl xlab "Longitude" ;   ppl ylab "Latitude"
   ppl fillpol
   go land

!------------end of scatter_data.jnl----------------------------

On Thu, 23 Jun 2005, Steve Guimond wrote:

Ferret Clan:
  I have a set of satellite data that is not on a regular lat/lon grid
and has variable deltas in lat/lon as well.  The data looks something like
this:

lat     lon    value
20.12  10.14   1320
20.45  10.60   1200
etc...

Is there a way to plot the value that I read in point-by-point according
to the right lat/lon?  An IDL routine creates a small shape and then fills
that shape with an appropriate color correspoinding the the value at the
right lat/lon position.  How can this be accomplished in Ferret?

Thanks

Steve Guimond
Research Assistant
The Center for Ocean-Atmospheric Prediction Studies
  lat     lon    temp
 -12.25   65.4  27.54
  -5.67   79.3  28.75
  -7.02   70.4  28.41
  -5.43   79.3  28.75
  -6.90   78.0  28.62
  -4.46   78.2  29.09
   5.77   62.7  29.17
   3.01   64.8  29.46
   1.75   67.0  29.50
  -1.59   68.4  29.13
   4.04   51.5  25.92
   2.86   52.2  26.07
   7.91   51.8  25.60
   1.00   50.9  26.89
   0.53   47.1  25.92
  -4.12   51.6  26.95
  -6.01   47.2  26.16
 -11.50   43.4  26.20
   7.14   56.3  26.83
   0.20   63.7  28.09
  -0.03   54.2  27.27
  -0.55   51.4  27.18
  -4.07   47.1  27.35
  -2.11   45.4  27.11
  -1.96   58.5  24.93
  -0.31   57.7  27.84
   0.78   57.6  27.93
  -4.30   51.7  27.43
  -2.16   58.3  27.86
   1.02   82.1  29.30
   3.01   64.7  29.26
  15.99   56.9  26.88
  18.17   61.4  27.54
  21.69   64.9  27.33
  17.87   69.0  28.18
  14.11   67.7  28.42
  14.70   85.8  28.64
  10.75   83.4  28.62
  17.61   66.5  27.93
  19.90   61.4  27.22
  20.63   64.9  27.42
  21.91   63.2  27.38
  -4.22   80.3  28.95
  -2.64   82.0  29.10
   1.87   69.6  28.90
   2.55   65.9  28.81
   1.97   55.5  27.73
   4.29   72.4  28.79
  23.35   60.9  26.20
  12.34   65.2  28.46
  17.49   63.2  27.59
  16.50   67.2  28.10
   7.63   61.8  28.85
   0.16   61.3  29.16
   4.38   63.6  29.29
   6.50   62.3  28.96
   8.82   64.8  28.96
   7.88   72.3  28.84
  11.00   56.8  27.31
   3.72   86.1  29.40
   0.19   80.5  29.47
  -3.13   67.2  29.38
  12.73   84.0  28.79
  13.00   88.6  28.90
  14.74   91.0  28.93
  10.04   88.9  28.78
   9.51   92.0  28.69
   5.12   89.1  28.74
  13.25   65.6  28.14
  12.45   66.7  28.41
  -6.51   92.7  29.55
  -1.29   85.4  21.35
 -12.28  101.5  26.65
  -5.07   90.9  28.87
  -4.93   94.5  29.03
  -5.87   99.0  28.99
  -4.65   90.7  29.19
  -7.59   95.2  28.46
  -3.16   88.1  29.01
   1.97   91.6  29.29

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement