The command syntax for plotting columns of data files against one another was previously described in Section 2.6. In an extension of what is possible in Gnuplot, PyXPlot also allows one to plot rows of data against one another in horizontally-arranged data files. For this, the keyword rows is placed after the using modifier:
plot 'data.dat' index 1 using rows 1:2
For completeness, the syntax using columns is also accepted, to specify the default behaviour of plotting columns against one another:
plot 'data.dat' index 1 using columns 1:2
When plotting horizontally-arranged data files, the meanings of the index and every modifiers (see Section 2.6) are altered slightly. The former continues to refer to vertically-displaced blocks of data separated by two blank lines. Blocks, as referenced in the every modifier, likewise continue to refer to vertically-displaced blocks of data points, separated by single blank lines. The row numbers passed to the using modifier are counted from the top of the current block.
However, the line-numbers specified in the every modifier – i.e. variables ,
and
in the system introduced in Section 2.2 – now refer to horizontal columns, rather than lines. For example:
plot 'data.dat' using rows 1:2 every 2::3::9
would plot the data in row 2 against that in row 1, using only the values in every other column, between columns 3 and 9.