Hi MJ,
I was going to tell you to use mpOutlineSpecifiers, but realized that there's no way to set the individual line colors for each area you specify. There's also no way that I know of to individually specify the color for inland water boundaries (you can do this for fill, as you know).
Dave may have a better way of doing the below, but what I've done is create the map twice: one with the ocean drawn red, and one with the inland water drawn in blue. I then used gsn_add_annotation to make one of the maps an annotation of the other, and thus they become one plot. (You can't use "overlay" because this procedure doesn't allow you to overlay two maps).
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("x11" ,"inlandwater")
res = True
res@gsnFrame = False
res@gsnDraw = False
res@mpOutlineOn = True ; Default is False
res@mpFillOn = False ; Default is True
res@mpOutlineBoundarySets = "NoBoundaries"
res@mpOutlineSpecifiers = "Land"
res@mpGeophysicalLineColor = "Red"
;---Create first map with red land
map1 = gsn_csm_map(wks,res)
res@mpOutlineSpecifiers = "InlandWater"
res@mpGeophysicalLineColor = "blue"
;---Create second map with blue inlandwater
map2 = gsn_csm_map(wks,res)
;
; Make second map an annotation of the first one.
;
; The default is that both plots will be made the
; same size, so they will overlap perfectly.
;
amres = True
anno_id = gsn_add_annotation(map1,map2,amres)
;---Drawing the first map will draw both maps.
draw(map1)
frame(wks)
end
On Apr 4, 2011, at 2:49 PM, Michael J Murphy wrote:
> When using the gsn_csm_contour_map function I was unable to find a resource that changes the Inland water line color. I could change both the coastline and inland water line color with mpGeophysicalLineColor; however, I want the coastline and inland water line colors to be different. Is this possible with NCL?
>
> I don't want to use a MapFill, I just want the coast and inland water lines to be different colors (that I specified).
>
> Thanks,
> MJ
>
>
>
> _______________________________________________
> 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 Apr 5 08:59:22 2011
This archive was generated by hypermail 2.1.8 : Tue Apr 05 2011 - 09:01:21 MDT