Re: gsn_add_polyline in LambertConformal

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Sep 11 2012 - 15:19:49 MDT

Try setting:

mpres@mpGreatCircleLinesOn = True

http://www.ncl.ucar.edu/Document/Graphics/Resources/mp.shtml#mpGreatCircleLinesOn

See the new example "polyg_15.ncl" at:

http://www.ncl.ucar.edu/Applications/polyg.shtml

--Mary

On Sep 11, 2012, at 12:39 PM, Alexander Cohan wrote:

> Hello,
>
> I would like to use

> to draw a straight line in
> LambertConformal, however the lines are curved. How can I make the
> lines straight?
> The NCL script is below.
>
> Thanks!
> Alex
>
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>
> begin
>
> wks = gsn_open_wks ("pdf", "DOMAIN3") ; open workstation
>
> mpres = True ; plot mods desired
> mpres@gsnMaximize = True
> mpres@gsnFrame = False
> mpres@gsnDraw = False
>
> mpres@mpDataBaseVersion = "Ncarg4_1"
> mpres@vpWidthF = 0.90 ; change aspect ratio of plot
> mpres@vpHeightF = 0.90
> mpres@vpXF = 0.05
>
> mpres@vpYF = 0.95
> mpres@gsnMaximize = True
> mpres@mpFillOn = True
> mpres@mpLandFillColor = "Background"
> mpres@mpPerimOn = False
> mpres@mpOutlineOn = True
> mpres@mpOutlineBoundarySets = "GeophysicalandUSStates"
> ;
> ; Zoom in on United States.
> ;
> mpres@mpProjection = "LambertConformal"
> mpres@mpLambertParallel1F = 33.0
> mpres@mpLambertParallel2F = 45.0
> mpres@mpLambertMeridianF = -97.0
> mpres@mpLimitMode = "LatLon"
>
> mpres@mpGridAndLimbOn = True
> mpres@pmTickMarkDisplayMode = "Always" ; turn on tickmarks
> mpres@mpGridAndLimbDrawOrder = "PreDraw" ; Draw grid before
>
> mpres@mpGridLineThicknessF = 10
> mpres@mpGridLineColor = "blue"
> mpres@mpFillColor ="blue"
>
> mpres@tiMainString = "CONUS 36km Domain"
>
>
> mpres@mpMinLatF = 18.17032
> mpres@mpMaxLatF = 53.2662
> mpres@mpMinLonF = -121.7744
> mpres@mpMaxLonF = -63.23684
> mpres@mpGridSpacingF = 0.0555
> map_thin = gsn_csm_map(wks,mpres)
>
>
> ;draw box 1
> xbox= (/-98.32171,-98.64162,-75.10528,-79.25256,-98.32171/)
> ybox= (/35.00315, 49.48106, 47.72993, 33.57016,35.00315/)
> resA=True
> resA@gsLineThicknessF = 10.
> resA@gsLineColor ="red"
> resA@gsFillOpacityF = 0.9
> resA@gsMarkerOpacityF =0.1
> resA@mpProjection = "LambertConformal"
>
> dum = new(4,graphic)
> do i = 0 , 3
> dum(i)=gsn_add_polyline(wks,map_thin,xbox(i:i+1),ybox(i:i+1),resA)
> end do
> draw(map_thin) ; Both maps will get drawn.
>
> frame(wks)
>
> end
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Sep 11 15:19:59 2012

This archive was generated by hypermail 2.1.8 : Tue Sep 11 2012 - 15:30:41 MDT