Credits Overview Plotting Styles Commands Terminals

Mark data

The data structure for each mark holds an identifying numeric tag, a title that will be reported by "show mark", a fill style, and a fill color. These properties are all controlled using the set mark command.

     set mark <tab> {<data>} {<properties>}

The mark also holds an array of data describing the vertices of polygons and lines. This section describes the format and interpretation of mark data.

The vertices of mark elements are read sequentially, with an empty record separating one polygon or line segment from the next. This is similar to the input format used for plot with polygons. If you add vertices using set mark N append <data> the empty record is added automatically.

Each vertex has three values [x y mode]. The mode values are

     0  (default) use whatever stroke and fill the fillstyle implies
     1  always stroke, never fill
     2  always fill, never stroke
     3  always stroke and fill
     4  fill with background color

If the mode value is 0 or not present, each group of vertices will be treated as a filled polygon if the active fillstyle is not "fs empty", and will be stroked if the active fillstyle is not "fs noborder". This is the default.

Here is an example of defining three triangular marks. One will always be drawn as an empty triangle (mode 1). The second will always be drawn as a filled triangle with no border (mode 2). The third will default to whatever fillstyle is active when the mark is used. This would typically be the filstyle given in a command plot with marks mt 3 or in a command set object mark mt 3.

     array t = [ {-0.5, 0}, {0, 0.7}, {0.5, 0}, {-0.5, 0} ]
     set mark 1 t using 2:3:(1) title "empty triangle"
     set mark 2 t using 2:3:(2) title "filled triangle"
     set mark 3 t using 2:3     title "generic triangle"

For an example of the format as provided in a file or datablock see marks examples annotation or marks examples windbarbs.