## 3.9.2 Choosing which data to plot

The final modifier which the `plot` command takes to allow the user to specify which subset(s) of a data file should be plotted is `select`. This can be used to plot only those data points in a data file which satisfy some given criterion, as in the following examples:

    plot 'data.dat' select ($8>5)
    plot sin(x) select (($1>0) and ($2>0))

In the second example, two selection criteria are given, combined with the logical `and` operator. A full list of all of the operators recognised by Pyxplot, including logical operators, was given in Table 3.1.

When plotting using `lines` to connect the data points (see Section 3.13 for more information about Pyxplot’s plotting styles), the default behaviour is for the lines not to be broken if a set of data points are removed by the `select` modifier. However, this behaviour is sometimes undesirable. To cause the plotted line to break when points are removed the `discontinuous` modifier is supplied after the `select` modifier, as in the example

    plot sin(x) select ($2>0) discontinuous

which plots a set of disconnected peaks from the sine function.