Credits | Overview | Plotting Styles | Commands | Terminals
--- | --- | --- | --- | ---

## sectors

The 2D plotting style with sectors renders one annular segment ("sector") for each line of input data. The shape of each sector is described by four required data values. An additional pair of data values can be included to specify the origin of the annulus this sector is taken from. A per-sector color may be provided in an additional column.

The plot style itself can be used in either cartesian or polar mode (set polar). The units and interpretation for the azimuth and the sector angle are controlled using set angles and set theta.

Columns 1 and 2 specify the azimuth (theta) and radius (r) of one corner of the sector. Columns 3 and 4 specify the angular and radial extents of the sector ("sector_angle" and "annular_width"). Columns 5 and 6, if present, specify the coordinates of the center of the annulus (default [0,0]). The interpretation is [x,y] in cartesian mode and [theta,r] in polar mode.

Syntax:

        plot DATA {using specifier} {units xy | units xx | units yy}

using specifier

        4 columns: azimuth radius sector_angle annular_width
        5 columns: azimuth radius sector_angle annular_width color
        6 columnd: azimuth radius sector_angle annular_width center_x center_y
        7 columns: azimuth radius sector_angle annular_width center_x center_y color

Note that if the x and y axis scales are not equal, the envelope of the full annulus in x/y coordinates will appear as an ellipse rather than a circle. The annulus envelope and thus the apparent sector annular width can be adjusted to correct for unequal axis scales using the same mechanism as for ellipses. Adding units xx to the command line causes the sector to be rendered as if the current x axis scale applied equally to both x and y. Similarly units yy causes the sector to be rendered as if the current y axis scale applied equally to both x and y. See set isotropic, set style ellipse.

Plotting with sectors can provide polar coordinate equivalents for the cartesian plot styles boxes (see wind rose figure), boxxyerror and image pixels (see example in heatmaps). Because sector plots are compatible with cartesian mode plot layout, multiple plots can be placed at different places on a single graph, which would not be possible for other polar mode plot styles.

An example of using sectors to create a wind rose in shown here. Other applications include polar heatmaps, dial charts, pie/donut charts, and annular error boxes for data points in polar coordinates. Worked examples for all of these are given in the sectors demo.