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

3.26.1.4 matrix

Datafile can be in an ascii or binary matrix format. The ‘matrix‘ flag indicates that the file is ascii, the ‘binary‘ or ‘matrix binary‘ stands for a binary format. For details, see ‘matrix ascii‘ and ‘matrix binary‘.

Basic usage in ‘splot‘:

 
    splot 'a.dat' matrix
    splot 'a.gpbin' {matrix} binary

Advanced usage in ‘splot‘:

 
    splot 'a.dat' matrix using 1:2:3
    splot 'a.gpbin' {matrix} binary using 1:2:3

allows to transform the axes coordinates and the z-data independently.

Usage in ‘plot‘:

 
    plot `a.dat` matrix
    plot `a.dat` matrix using 1:3
    plot 'a.gpbin' {matrix} binary using 1:3

will plot rows of the matrix, while using 2:3 will plot matrix columns, and using 1:2 the point coordinates (rather useless). Applying the every option you can specify explicit rows and columns.

Example – rescale axes of a matrix in an ascii file:

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

Example – plot the 3rd row of a matrix in an ascii file:

 
    plot 'a.dat' matrix using 1:3 every 1:999:1:2

(rows are enumerated from 0, thus 2 instead of 3).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.