#!/usr/bin/env python# -*- coding: utf-8 -*-"""Plot a nice histogram of element angles to plot_element_angles.jpg. Thescript expects an elem.dat file in the present working directory.Examples-------- >>> ls -1 elec.dat elem.dat >>> grid_plot_elem_angles >>> ls -1 elec.dat elem.dat plot_element_angles.jpg"""importosimportcrtomo.gridasCRGrid
[docs]defmain():ifnotos.path.isfile('elem.dat'):raiseException('elem.dat not found!')grid=CRGrid.crt_grid()grid.load_elem_file('elem.dat')fig,ax=grid.analyze_internal_angles(return_plot=True)fig.savefig('plot_element_angles.jpg',dpi=300)