esta.plot package
Contents
esta.plot package#
Submodules#
esta.plot.atomic_Distance_Density module#
esta.plot.atomic_distance_density_class2 module#
- class esta.plot.atomic_distance_density_class2.atom_distance_density#
- Bases: - object- script to calculate the atomic distance density for a specific bond of atoms in the POSCAR file - The probability density for the Gaussian distribution is - p(x) = - rac{1}{sqrt{ 2 pi sigma^2 }} e^{ - rac{ (x - mu)^2 } {2 sigma^2} }, - where mu is the mean and sigma the standard deviation. The square of the standard deviation, sigma^2, is called the variance. - The function has its peak at the mean, and its “spread” increases with the standard deviation (the function reaches 0.607 times its maximum at x + sigma and x - sigma [2]). This implies that numpy.random.normal is more likely to return samples lying close to the mean, rather than those far away. - x : ? - atomic distance density array and distance array are returned. - # See Also # ——– # add other related things here. - # Notes # —– - # Examples # ——– - distance_array(natom_type, tau_cartesian)#
 - dos(array_distribution, sigma)#
- Now calculation of atomic distance density 
 - gaussian_distribution(x0, x, sigma)#
 - remove_duplicate(list_entries)#
 
esta.plot.broken_axis_plot__most_done_only_axis_allignmnet_left module#
- esta.plot.broken_axis_plot__most_done_only_axis_allignmnet_left.get_bader_data()#
- esta.plot.broken_axis_plot__most_done_only_axis_allignmnet_left.get_broken_axis_plot(x, y, y_lim1, y_lim2, y_lim3, y_lim4)#
- Broken axis example, where the y-axis will have a portion cut out. - x : x data y : y data y_lim1 = [0.78, 1] –> range of y aixs for outlier data y_lim2 = [0 ,0.22] –> range of y aixs for main part of the data - # for -ve y axis data … y_lim3 = [0.78, 1] –> range of y aixs for outlier data y_lim4 = [0 ,0.22] –> range of y aixs for main part of the data - plot : broken axis plot 
esta.plot.charge_bader module#
esta.plot.free_energy_2 module#
esta.plot.multiplot module#
create a class to store the data from all the files containing the dos/pdos information .. along with the information of Fermi energy
- class esta.plot.multiplot.DataStore(Fermi_energy, **file_names)#
- Bases: - object- store data from the dos/pdos *dat files having rows and columns - read_data(**file_names)#
 
- esta.plot.multiplot.plot_multiplot_in_1column(data, hspace=None, outfile=None)#
- multiplot in one column with nrows of data from many files < = 4files .. more possible - Parameters
- data (array of rank 4) – array of rank 4 i.e. data(nsystem, nfiles, rnows, ncols) e.g. (5, 3, 5438, 2) 
- hspace (hspace in plots (optional)) – horizontal space between plots 
 
- Return type
- plot the multiplot data in along multiple rows 
 
esta.plot.plot2D module#
- esta.plot.plot2D.contour_plot(x, y, fxy)#
- input:
- x: 1D array y: 1D array fxy: 2D array over a 2D grid defined by x and y 
- output:
- surface plot save jpg file 
 
- esta.plot.plot2D.rosenbrock_2D(xpos, ypos)#
- Rosenbrock function in 2D 
- esta.plot.plot2D.surface_plot(x, y, fxy)#
- surface plot of a function in 2D - input:
- x: 1D array y: 1D array fxy: 2D array over a 2D grid defined by x and y 
- output:
- surface plot save jpg file 
 
esta.plot.plot_2Ddata_NEB module#
method to plot the neb energy plots
- esta.plot.plot_2Ddata_NEB.get_neb_plot(energy_list, index)#
- method to plot the neb energy plots - input:
- list of energy for images index for those energy points 
- output:
- plot the barrier/energy plots 
 
esta.plot.plot_2Ddata_NEB_adv module#
- esta.plot.plot_2Ddata_NEB_adv.get_neb_plot(energy_list, index)#
- method to plot the neb energy plots using spline interpolate or simple fitting … - input:
- list of energy for images index for those energy points 
- output:
- plot the barrier/energy plots 
 
esta.plot.plot_bar_chart_bader module#
esta.plot.plot_free_energy_vs_reaction_coordinate_adv module#
- esta.plot.plot_free_energy_vs_reaction_coordinate_adv.plot_free_energy(data)#
- argument:
- data: NxM array of free energies at different temperatures
- N = no of temp values, M number of free energies for a given temp value. 
 
 - Returns
- plot the array of free energies as horizontal lines over the y axis 
 
esta.plot.plot_pdos_Natoms_contribution_adv_both_spin_possible module#
- esta.plot.plot_pdos_Natoms_contribution_adv_both_spin_possible.checkEqual_list(lst)#
- comparing all the elements of list and return logical variable whether they are same or different 
- esta.plot.plot_pdos_Natoms_contribution_adv_both_spin_possible.get_fermi(filein)#
- esta.plot.plot_pdos_Natoms_contribution_adv_both_spin_possible.get_fermi_from_dos(filedos)#
- esta.plot.plot_pdos_Natoms_contribution_adv_both_spin_possible.get_pdos_files(atm_info)#
- extract files based on the atomic number of atoms - atm_info: list of integers for atoms whose pdos is needed with all s,p,d…charaters - fileslist: list of all files whose pdos is needed 
- esta.plot.plot_pdos_Natoms_contribution_adv_both_spin_possible.get_plots(fileout, llabel, fil, refenergy=None, lspin=False)#
- plot data in the form of single or multiple plots - Note - for multiple plots: try following - fig, (ax1, ax2, ax3) = plt.subplots(3, 1, sharex=True) - ax1.fill_between(x, 0, y1, facecolor=’yellow’, alpha=0.5)) ax1.set_ylabel(‘between y1 and 0’) - ax2.fill_between(x, y1, 1) ax2.set_ylabel(‘between y1 and 1’) - ax3.fill_between(x, y1, y2) ax3.set_ylabel(‘between y1 and y2’) ax3.set_xlabel(‘x’) 
- esta.plot.plot_pdos_Natoms_contribution_adv_both_spin_possible.get_plots1(filename, fileout, llabel, refenergy=None, lspin=False)#
- plot data in the form of single or multiple plots - Note - for multiple plots: try following - fig, (ax1, ax2, ax3) = plt.subplots(3, 1, sharex=True) - ax1.fill_between(x, 0, y1, facecolor=’yellow’, alpha=0.5)) ax1.set_ylabel(‘between y1 and 0’) - ax2.fill_between(x, y1, 1) ax2.set_ylabel(‘between y1 and 1’) - ax3.fill_between(x, y1, y2) ax3.set_ylabel(‘between y1 and y2’) ax3.set_xlabel(‘x’) 
- esta.plot.plot_pdos_Natoms_contribution_adv_both_spin_possible.get_range_int_from_intervals(list_of_intervals)#
- get range of integers from intervals (in the form of strings) - list of intervals: e.g. [‘1’,’2-4’,’6-10’] note that elements of list are strings - range of intervals: e.g. [1, 2, 3, 4, 6, 7, 8, 9, 10] note that elements are integers 
- esta.plot.plot_pdos_Natoms_contribution_adv_both_spin_possible.process_colums(filelist, lspin=None)#
- summing the 2nd, and 3rd columns of the following multiple files and create new file with 0th column (from one file), 1st summed and 2nd summed columns from all files 
 - filelist: list of all files whose columns hve to be processed - sum_data_file: file with resultant columns, data_array: array[:,:,0:3] data with processed columns 
esta.plot.plot_pdos_with_atoms_contribution_2plots_qe module#
- esta.plot.plot_pdos_with_atoms_contribution_2plots_qe.checkEqual_list(lst)#
- comparing all the elements of list and return logical variable whether they are same or different 
- esta.plot.plot_pdos_with_atoms_contribution_2plots_qe.get_fermi(filein)#
- esta.plot.plot_pdos_with_atoms_contribution_2plots_qe.get_fermi_from_dos(filedos)#
- esta.plot.plot_pdos_with_atoms_contribution_2plots_qe.get_pdos_files(atm_info)#
- extract files based on the atomic number of atoms - atm_info: list of integers for atoms whose pdos is needed with all s,p,d…charaters - fileslist: list of all files whose pdos is needed 
- esta.plot.plot_pdos_with_atoms_contribution_2plots_qe.get_plots(fileout, llabel, fil, refenergy=None, lspin=False)#
- plot data in the form of single or multiple plots - Note - for multiple plots: try following - fig, (ax1, ax2, ax3) = plt.subplots(3, 1, sharex=True) - ax1.fill_between(x, 0, y1, facecolor=’yellow’, alpha=0.5)) ax1.set_ylabel(‘between y1 and 0’) - ax2.fill_between(x, y1, 1) ax2.set_ylabel(‘between y1 and 1’) - ax3.fill_between(x, y1, y2) ax3.set_ylabel(‘between y1 and y2’) ax3.set_xlabel(‘x’) 
- esta.plot.plot_pdos_with_atoms_contribution_2plots_qe.get_plots1(filename, fileout, llabel, refenergy=None, lspin=False)#
- plot data in the form of single or multiple plots - Note - for multiple plots: try following - fig, (ax1, ax2, ax3) = plt.subplots(3, 1, sharex=True) - ax1.fill_between(x, 0, y1, facecolor=’yellow’, alpha=0.5)) ax1.set_ylabel(‘between y1 and 0’) - ax2.fill_between(x, y1, 1) ax2.set_ylabel(‘between y1 and 1’) - ax3.fill_between(x, y1, y2) ax3.set_ylabel(‘between y1 and y2’) ax3.set_xlabel(‘x’) 
- esta.plot.plot_pdos_with_atoms_contribution_2plots_qe.get_range_int_from_intervals(list_of_intervals)#
- get range of integers from intervals (in the form of strings) - list of intervals: e.g. [‘1’,’2-4’,’6-10’] note that elements of list are strings - range of intervals: e.g. [1, 2, 3, 4, 6, 7, 8, 9, 10] note that elements are integers 
- esta.plot.plot_pdos_with_atoms_contribution_2plots_qe.process_colums(filelist)#
- summing the 2nd, and 3rd columns of the following multiple files and create new file with 0th column (from one file), 1st summed and 2nd summed columns from all files 
 - filelist: list of all files whose columns hve to be processed - sum_data_file: file with resultant columns, data_array: array[:,:,0:3] data with processed columns 
esta.plot.plot_xanes_ module#
- esta.plot.plot_xanes_.get_fermi(filein)#
- esta.plot.plot_xanes_.get_plots(filename, fileout, refenergy=None)#
- plot data in the form of single or multiple plots 
esta.plot.plotxy module#
- esta.plot.plotxy.get_plot(*args, markersize=None, xLabel=None, yLabel=None, Title=None, fileout=None)#
- plot data in the form of single or multiple plots - Parameters
- args (keyword argumets) – args contains x, y, marker, linestyle, and color; marker, linestyle and color are optional 
- markersize (scalar) – size of marker, optional 
- xLabel (str) – x label, optional 
- yLabel (str) – y label, optional 
- Title (str) – Title, optional 
- fileout (str, optional) – name of the output file 
 
- Return type
- fileout.png file as output 
 
- esta.plot.plotxy.get_plot1(*args, markersize=None, xLabel=None, yLabel=None, Title=None, fileout=None)#
- plot data in the form of single or multiple plots 
- esta.plot.plotxy.get_plot_multiple(*args, ylimits=None, markersize=None, llegend=None, xLabel=None, yLabel=None, Title=None, fileout=None)#
- plot multiple data in a single plot by making multiple calls to this method - Parameters
- args (keyword argumets) – args contains x, y, marker, linestyle, and color; marker, linestyle, and color are optional and for single plot only 
- ylimits (list) – scalars for min and max y limits, optional, but better input the limits 
- markersize (scalar) – size of marker, optional 
- llegend (list) – a list of labels for the legends, optional 
- xLabel (str) – x label, optional 
- yLabel (str) – y label, optional 
- Title (str) – Title, optional 
- fileout (str, optional) – name of the output file 
 
- Return type
- fileout.png file as output 
 
esta.plot.plotxy0 module#
- esta.plot.plotxy0.get_plot(x, y, xLabel, yLabel, Title=None, fileout=None)#
- plot data in the form of single or multiple plots 
esta.plot.plotxy1 module#
- esta.plot.plotxy1.get_plot(x, y, marker=None, markersize=None, xLabel=None, yLabel=None, Title=None, fileout=None)#
- plot data in the form of single or multiple plots 
esta.plot.plotxy_adv module#
- esta.plot.plotxy_adv.get_plot(x, y, marker=None, markersize=None, xLabel=None, yLabel=None, Title=None, fileout=None)#
- plot data in the form of single or multiple plots 
esta.plot.plotxy_advv module#
- esta.plot.plotxy_advv.get_plot(*args, markersize=None, xLabel=None, yLabel=None, Title=None, fileout=None)#
- plot data in the form of single or multiple plots - Parameters
- args (keyword argumets) – args contains x, y, marker, linestyle, and color; marker, linestyle and color are optional 
- markersize (scalar) – size of marker, optional 
- xLabel (str) – x label, optional 
- yLabel (str) – y label, optional 
- Title (str) – Title, optional 
- fileout (str, optional) – name of the output file 
 
- Return type
- fileout.png file as output 
 
- esta.plot.plotxy_advv.get_plot1(*args, markersize=None, xLabel=None, yLabel=None, Title=None, fileout=None)#
- plot data in the form of single or multiple plots 
- esta.plot.plotxy_advv.get_plot_multiple(*args, ylimits=None, markersize=None, llegend=None, xLabel=None, yLabel=None, Title=None, fileout=None)#
- plot multiple data in a single plot by making multiple calls to this method - Parameters
- args (keyword argumets) – args contains x, y, marker, linestyle, and color; marker, linestyle, and color are optional and for single plot only 
- ylimits (list) – scalars for min and max y limits, optional, but better input the limits 
- markersize (scalar) – size of marker, optional 
- llegend (list) – a list of labels for the legends, optional 
- xLabel (str) – x label, optional 
- yLabel (str) – y label, optional 
- Title (str) – Title, optional 
- fileout (str, optional) – name of the output file 
 
- Return type
- fileout.png file as output 
 
esta.plot.tex_demo module#
Rendering math equations using TeX#
You can use TeX to render all of your Matplotlib text by setting :rc:`text.usetex` to True. This requires that you have TeX and the other dependencies described in the /tutorials/text/usetex tutorial properly installed on your system. Matplotlib caches processed TeX expressions, so that only the first occurrence of an expression triggers a TeX compilation. Later occurrences reuse the rendered image from the cache and are thus faster.
Unicode input is supported, e.g. for the y-axis label in this example.