Re: overlaying filled polygons on a contoured map, colormap issue

From: Marc Pace Marcella <marcpace_at_nyahnyahspammersnyahnyah>
Date: Thu Sep 12 2013 - 11:01:45 MDT

figured it out. thanks for all the responses though!

From: Marc Pace Marcella
Sent: Wednesday, September 11, 2013 2:14 PM
Subject: overlaying filled polygons on a contoured map, colormap issue

Hi all,

I am trying to overlay observed wind values shaded in as polygons over a contour map of spatially continuous modeled winds, using the same color palette and contouring level to compare model to obs output easily.

However, it appears that something goes awry with setting up the background and font colors as instead of white and black they are black and green, respectively. Likewise, I am having a problem in getting the colormap to work properly for the contour filling of the underlying contour map, as all values are just some shade of green. (see attached image). Is what I am trying to do possible? Below is the snippet of code, I think, that is responsible for all the color assigning and drawing for the contoured map and shaded polygons.


  wks = gsn_open_wks ("pdf","tcr_wind_polyg")
  gsn_define_colormap (wks,"amwg")
  cmap = gsn_retrieve_colormap(wks)

  cnLevels = ispan(20,80,6)

  res = True
  res@gsnAddCyclic = False
  res@cnFillOn = True
  res@cnLinesOn = False
  res@cnLevelSelectionMode = "ExplicitLevels"
  res@cnLevels = ispan(20,80,6)
  res@lbOrientation = "Vertical"
  res@lbBoxLinesOn = False
; map resources

  res@mpFillOn = False
  res@gsnMaximize = True

  res_poly = True
  res_poly@mpGridAndLimbOn = True
  res_poly@OutlineBoundarySets = "National"

  res@gsnDraw = False ; don't draw the plots now
  res@gsnFrame = False ; or advance the frame

   map = gsn_csm_contour_map(wks,aer_vals,res) ;map = gsn_csm_map(wks,res)


        do i=0,tcr_size-1,1
      res_poly@gsFillColor = GetFillColor(cnLevels,cmap,tcr_wind(i))
      gsn_polygon (wks,map,tcr_poly_x(i,:),tcr_poly_y(i,:),res_poly)
  end do


ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Thu Sep 12 11:04:14 2013

This archive was generated by hypermail 2.1.8 : Mon Sep 16 2013 - 13:43:52 MDT