manpagez: man pages & more
info gnuplot
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ] matrix_ascii

The ‘matrix‘ keyword (without a sequent ‘binary‘ keyword) in

    {s}plot 'a.dat' matrix

indicates that data are stored in an ascii numbers matrix format.

The z-values are read in a row at a time, i. e.,

    z11 z12 z13 z14 ...
    z21 z22 z23 z24 ...
    z31 z32 z33 z34 ...

and so forth.

In 3D, the x- and y-indices of the matrix surface plot correspond to column and row indices of the matrix, respectively, being enumerated from 0. You can rescale or transform the axes as usual for a data file with three columns by means of x=$1, y=$2, z=$3. For example

    splot 'a.dat' matrix using (1+$1/100):(1+$2*10):3

A blank line or comment line ends the matrix, and starts a new surface mesh. You can select among the meshes inside a file by the index option to the ‘splot‘ command, as usual.

See ‘matrix‘ for examples of plotting rows and columns of the matrix in a 2D plot.

This document was generated on November 19, 2011 using texi2html 5.0.

© 2000-2018
Individual documents may contain additional copyright information.