[ncl-talk] psudocolor plot

David Brown dbrown at ucar.edu
Wed Jan 21 11:43:06 MST 2015


Hi David,
If I understand what matlab pcolor does, then yes there is such a
facility in NCL. It is implemented as a contour fill mode, controlled
by the resource
cnFillMode. If you want exact representations of each cell in the
plot, then set cnFillMode to "CellFill".  This method draws a small
polygon for each cell. The color of the cell is determined by the
value of the center of the cell for cell-centered data, or by an
average of the values at the vertices for cell-bounded data. This
method can create very big files for high resolution data if a vector
output format like PDF or PostScript is used. Drawing to a PNG avoids
this issue, although you may need to increase the resolution of the
output by setting wkWidth and wkHeight to values greater than the
default of 1024.
You can also draw non-interpolated color fill plots by setting
cnFillMode to "RasterFill" and also making sure that
cnRasterSmoothingOn is not changed from its default, which is False.
For this method you can depict the cells exactly only if the edges are
strictly horizontal and vertical. Otherwise, this method creates a
pixel-ized plot where the cells are approximated. Increasing the
output resolution can improve the fidelity of the rendering. To
increase the resolution of a raster fill plot you must both set the
resolution of the output workstation higher than the default (using
wkWidth and wkHeight) and also set the raster cell size to a smaller
value than the default (using the resource cnRasterCellSizeF).
Hope this helps.
 -dave


On Wed, Jan 21, 2015 at 1:43 AM, David Craig <dcdavemail at gmail.com> wrote:
> Hello,
>
> Is there some functionality in ncl for psuedocolor plots, something like
> matlabs pcolor. I know contours can be used but I prefer to have no
> interpolation.
>
> thanks,
> David
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk


More information about the ncl-talk mailing list