exc!ting
exciting
a full-potential all-electron package implementing linearized augmented planewave methods

The Python Script "plot.files"

by Pasquale Pavone

 

Purpose: This python script is part of the excitingscripts module and 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 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:

Argument Shortcut Default Description
--files -f   (mandatory) List of file names containing data to plot. At least one file must be specified.
 
 

Optional arguments:

Argument Shortcut Default Description
--help -h   Show the help message and exit.
--directory -d './' List of the directories in which the data to be plotted have to be found. If only one or no directory is specified, the data for the plots are taken from the same directory.
--xboundary -x   One or two floats corresponding to the minimum and maximum x value in the plot.
--yboundary -y   One or two floats corresponding to the minimum and maximum y value in the plot.
--label_x -lx 'x [x]' A string corresponding to the x label.
--label_y -ly 'y [y]' A string corresponding to the y label.
--column_x -cx 1 List of integer values, each of them specifying the number of the text column in the corresponding file from which the x values must be read. If the value '0' is given, a running natural index is considered as x value.
--column_y -cy 2 List of integer values, each of them specifying the number of the text column in the corresponding file from which the y values must be read.
--scale_box -s 1.0 1.0 One or two floats corresponding to the scaling factor in the horizontal and vertical size of the plot appearence, respectively.
--x_scale -xs 1.0 A float corresponding to a scaling factor for the x values.
--y_scale -ys 1.0 A float corresponding to a scaling factor for the y values.
--legend_label -ll   Specifies the labels to appear in the legend for each plot.
--legend_position -lp 'best' The location of the legend. The strings 'upper left', 'upper right', 'lower left', 'lower right' place the legend at the corresponding corner of the axes/figure. The strings 'upper center', 'lower center', 'center left', 'center right' place the legend at the center of the corresponding edge of the axes/figure. The string 'center' places the legend at the center of the axes/figure. The string 'best' places the legend at the location, among the nine locations defined so far, with the minimum overlap with other drawn artists. This option can be quite slow for plots with large amounts of data; your plotting speed may benefit from providing a specific location. For back-compatibility, 'center right' (but no other location) can also be spelled 'right', and each string locations can also be given as the corresponding numeric value (see here for more details).
--title -t mmmmmmm Used as --title 'String as a title' assign a title to the plot.
--no_title -nt   If present, it disables the writing of the title.
--no_legend -nl   If present, it disables the plotting of the legend.
--grid -g   If present, a grid is plotted in correspondence to the position of the major ticks.
--reverse_colors -rc   If present, the order of the sequence of colors of the plots is reversed.
--reverse_plots -rp   If present, the order of appearance of the plots is reversed.
--print_markers -pm   If present, solid circle markers are additionally printed for indicating data points.
--max_ticks_x -mtx   Specifies the maximum number of ticks along the x-axis in the plot.
--max_ticks_y -mty   Specifies the maximum number of ticks along the y-axis in the plot.
--no_scientific -ns   If present, disables the scientific notation and the offset for labels on the axes.