PyNGL Home > Functions > Graphics routines

Ngl.polyline_ndc

Draws a polyline on the viewport.

Prototype

Ngl.polyline_ndc(wks, x, y, res=None)

Arguments

wks

The identifier returned from calling Ngl.open_wks.

x, y

One-dimensional NumPy arrays or Python lists containing the x, y NDC coordinates of the polyline.

res=None

An (optional) instance of the Resources class having GraphicStyle resources as attributes.

Return value

   None

Description

This procedure draws a polyline on the viewport of the requested workstation. x and y are 1-dimensional arrays (these can be Python lists or tuples, or NumPy arrays) defining the coordinates of the polyline in NDC space, and resources can optionally contain an unlimited number of GraphicStyle attributes that are resource names and their values.

The frame is not advanced when you call this procedure, so you need to call Ngl.frame yourself if you want to advance the frame.

There is no automatic handling of fill values. See the FAQ, How do I set a missing value for my data?

See Also

Ngl.polymarker_ndc, Ngl.polygon_ndc, Ngl.add_polyline, Ngl.polyline, Ngl.draw_ndc_grid

Examples

See example ngl07p.py and its output.