gsn_draw_named_colors
Draws the given list of named colors.
Prototype
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" procedure gsn_draw_named_colors ( wks [1] : graphic, colors [*] : string, dims [2] : integer )
Arguments
wksA Workstation identifier. The identifier is one returned either from calling gsn_open_wks or calling create to create a Workstation object.
colorsA string array of named colors.
dimsAn array of two elements representing the number of rows and columns to draw the colors in.
Description
This procedure takes the colors list of named colors, and draws them in a rows x column format (as specified by dims). This procedure is mostly for debugging purposes.
See Also
gsn_draw_colormap, gsn_define_colormap, gsn_reverse_colormap, gsn_retrieve_colormap, gsn_merge_colormaps
Examples
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" begin wks = gsn_open_wks("ncgm","gsn_draw_named_colors") colors = (/"white", "black", "PeachPuff", "MintCream", "SlateBlue", \ "Khaki", "OliveDrab","BurlyWood", "LightSalmon", "Coral", \ "HotPink", "LemonChiffon", "AliceBlue", "LightGrey", \ "MediumTurquoise", "DarkSeaGreen", "Peru", "Tomato", \ "Orchid","PapayaWhip"/) rows = 4 cols = 5 gsn_draw_named_colors(wks,colors,(/rows,cols/)) ; Draw the named colors. endFor some application examples, see:
See also the suite of color examples.