# 1.3 Labelling datapoints

The `label` modifier to the `plot` command may be used to add text labels next to datapoints, as in the following examples:

    set samples 8
    plot [2:5] x**2 label "$x=%.2f$"%($1) with points

    plot 'datafile' using 1:2 label "%s"%($3)

Note that if a particular column of a data file contains strings which are to be used as labels, as in the second example above, syntax such as `"%s"%($3)` must be used to explicitly read the data as strings rather than as numerical quantities. As Pyxplot treats any whitespace as separating columns of data, such labels cannot contain spaces, though latex’s `` character (a non-breaking space) can be used to achieve a space.

Data points can be labelled when plotted in any of the following plot styles: `arrows` (and similar styles), `dots`, `errorbars` (and similar styles), `errorrange` (and similar styles), `impulses`, `linespoints`, `lowerlimits`, `points`, `stars` and `upperlimits`. It is not possible to label datapoints plotted in other styles. Labels are rendered in the same color as the datapoints with which they are associated.