Question about CellFill

From: Ian Ross <Ian.Ross_at_nyahnyahspammersnyahnyah>
Date: Mon, 05 Feb 2007 14:54:47 +0000

Hi there,

I've been using NCL for a while now (great tool - thanks a lot to the
developers, and thanks to UCAR for making it freely available) and I
have a question about some maps I've been making.

These are contour plots filled using CellFill, and the problem is
essentially that there are fine white lines between the filled cells
on many plots. You can see what I mean on the first plot of the last
example on:

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

and also in the output from the test script at the bottom of this
message.

The lines between the filled cells are very fine, but they are real.
There are two questions, I suppose:

 - Is it possible to make them go away? Is this some sort of rounding
   problem in the calculation of the cell boundaries, or is it
   something harder to fix?

 - Are the lines going to show up when these plots are typeset?
   They're clearly visible in a PostScript viewer, but not really
   visible in printed output (medium-quality monochrome laser
   printer). They also produce a moire effect in some cases (you can
   see this in the ORCA example above, in the Bight of Benin) and that
   might cause trouble with higher resolution printing.

Thanks a lot,

Ian Ross.

----------------------------------------------------------------------
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

begin
  pi = 4.0 * atan(1.0)
  lat = fspan(0.0, 90.0, 46)
  lon = fspan(0.0, 360.0, 181)
  tstdat = new((/ 46, 180 /), float)
  do latidx = 0, 45
    tstdat(latidx, :) = sin(3.0 * lon(0:179) / 180.0 * pi) * \
      exp(-((lat(latidx) - 30.0)^2) / (2.0 * 15.0^2))
  end do

  wks = gsn_open_wks("ps", "tst")
  gsn_define_colormap(wks, "rainbow")

  res = True
  res_at_sfXArray = lon
  res_at_sfYArray = lat
  res_at_cnFillOn = True
  res_at_cnFillMode = "CellFill"
  res_at_cnLinesOn = False
  res_at_cnLineLabelsOn = False
  res_at_gsnPolar = "NH"
  res_at_gsnSpreadColors = True

  map = gsn_csm_contour_map_polar(wks, tstdat, res)
end
----------------------------------------------------------------------

-- 
Ian Ross, Geographical Sciences, University of Bristol, U.K.
Ian.Ross_at_bristol.ac.uk
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Feb 05 2007 - 07:54:47 MST

This archive was generated by hypermail 2.2.0 : Wed Feb 07 2007 - 10:22:46 MST