[ncl-talk] draw different box panel

Rashed Mahmood rashidcomsis at gmail.com
Mon Dec 18 11:02:15 MST 2017


Hello Ehsan,
Try the following.

You would need to change lat,long values in these lines. I just added
randomly as an example
min_lat = (/36.,35.,34.,33.,32.,31./)
max_lat = (/38.,37.,36.,35.,34.,33./)
min_lon = (/44.,43.,41.,40.,39.,38./)
max_lon = (/51.,50.,49.,48.,47.,46./)

  boxes                        = new(dimsizes(min_lat),graphic)
  plres                        =  True
  plres at gsLineThicknessF       =  2.0        ;-- set line thickness

  do m=0,dimsizes(min_lat)-1
     x = (/min_lon(m), max_lon(m), max_lon(m), min_lon(m), min_lon(m)/)
     y = (/min_lat(m), min_lat(m), max_lat(m), max_lat(m), min_lat(m)/)
     boxes(m) = gsn_add_polyline(wks, plot_smap(m), x, y, plres)
  end do


In this way you can also change colors, thickness etc of the box lines.

Cheers,
Rashed




From: Ehsan Taghizadeh <ehsantaghizadeh at yahoo.com>
To: Ncl-talk <ncl-talk at ucar.edu>
Subject: [ncl-talk] draw different box panel
Message-ID: <46793620.468602.1513577292202 at mail.yahoo.com>
Content-Type: text/plain; charset="utf-8"

Hi,I want to draw different boxex (with different latitude(North, South)
and different longitude(East,West)) for each figure in a panel(3,2).
Attached files is the script which plot same box for each figure, and also
output figure of it, but how could I move the box in each figure? The
command for drawing polyline is in lines 310-312.Should I draw each figure
separately?
SincerelyEhsan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/
attachments/20171218/099447c5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smap_l3_1_2_shp_polygon.ncl
Type: application/octet-stream
Size: 12665 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/
attachments/20171218/099447c5/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SPL2SMP_E_20170411_22.png
Type: image/png
Size: 409807 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/
attachments/20171218/099447c5/attachment.png>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171218/ef8f023f/attachment.html>


More information about the ncl-talk mailing list