PyNGL Home > Functions > Graphics routines


Draws polymarkers on an existing plot.


Ngl.polymarker(wks, plot, x, y, res=None)



The identifier returned from calling Ngl.open_wks.


The id of the plot which you want to draw the polymarkers on.

x, y

Scalars, one-dimensional (masked) NumPy arrays, or Python lists containing the x, y coordinates of the polymarkers.


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

Return value



This function draws polymarkers on the given plot. plot is the value returned from a previous call to one of the PyNGL plotting functions, like Ngl.xy, Ngl.contour_map, etc. x and y are 1-dimensional arrays (these can be Python lists or tuples, or NumPy arrays) defining the coordinates of the polymarkers, and resources can optionally contain an unlimited number of GraphicStyle attributes that are resource names and their values. Note that x and y must be in the same data space as the data in plot.

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

If you plan to resize your plot or use it in a call to Ngl.panel, then it is better to use the function Ngl.add_polymarker. With this function, the polymarkers are attached to the plot and will automatically get resized when the plot is resized.

As of version 1.3.0, there is automatic handling of missing data if one or both of the input arrays are masked arrays. Missing data will not be plotted.

See Also

Ngl.add_polymarker, Ngl.polymarker_ndc, Ngl.polyline, Ngl.polygon


See the example and its output and the example and its output.