Ngl.labelbar_ndc
Draws a labelbar anywhere in the viewport.
Prototype
pid = Ngl.labelbar_ndc(wks, nboxes, labels, x, y, res=None)
Arguments
wksThe identifier returned from calling Ngl.open_wks.
nboxesThe number of labelbar boxes.
labelsAn array of label strings for the labelbar boxes.
x, yThe NDC values defining the coordinates of the upper left corner of the labelbar.
res=NoneAn (optional) instance of the Resources class having Labelbar resources as attributes.
Return value
pidA PlotId representing the labelbar created.
Description
This function creates and draws a labelbar on the given workstation. LabelBar resources can be set via the res variable.
Note that some of the plotting routines, like Ngl.contour, will automatically generate a labelbar for you if color fill is turned on. This function is mostly useful if you need to generate additional labelbars, or if you need a more specialized labelbar than the automatic one that is created.
See Also
Ngl.legend_ndc, Ngl.draw_ndc_grid
Labelbar resources
Examples
See labelbar.py (output).