The Python Script "PLOT-files.py"
by Pasquale Pavone
Purpose: The python script PLOT-files.py is employed for producing plots of data included in different files in different directories. Here, we detail how this script works.
General description:
PLOT-files.py can be used basically to plot data from one or more files in the same directory or in different ones. The script generates the PNG output PLOT.png. The different cases are triggered by a series of required and optional arguments, which are described in the following.
Mandatory argument:
|
Optional arguments:
|
Examples:
☛ Plot from different files in the same directory:
$ PLOT-files.py -d DIR1 -f FILE1 FILE2 FILE3 FILE4
☛ Plot from the same file in different directories:
$ PLOT-files.py -f FILE1 -d DIR1 DIR2 DIR3 DIR4
☛ Plot the column m as a function of column n in the same file:
$ PLOT-files.py -f FILE -cx n -cy m
☛ Plot the columns n and m in a file in the current directory as a function of the column k in the same file:
$ PLOT-files.py -f FILE FILE -cx k k -cy n m
☛ Plot from file FILE in the directory DIR with x-label XLABEL and y-label YLABEL:
$ PLOT-files.py -f FILE -d DIR -lx XLABEL -ly YLABEL
☛ Plot from file FILE containing only one column of data as a function of a running index:
$ PLOT-files.py -f FILE -cx 0 -cy 1