ttight_layout call fixes energy plot label overlaps - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
 (HTM) git clone git://src.adamsgaard.dk/sphere
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit 4cc89f81f1466e8ad89bd8e9d2dd2bca89eafa20
 (DIR) parent f6055e5843f8c0fec16b36821c8113dd986f26a9
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Fri, 11 Oct 2013 11:20:42 +0200
       
       ttight_layout call fixes energy plot label overlaps
       
       Diffstat:
         M python/sphere.py                    |      22 ++++++++++++----------
       
       1 file changed, 12 insertions(+), 10 deletions(-)
       ---
 (DIR) diff --git a/python/sphere.py b/python/sphere.py
       t@@ -387,16 +387,14 @@ class Spherebin:
                            for z in range(self.num[2]):
                                for y in range(self.num[1]):
                                    for x in range(self.num[0]):
       -                                #print(str(x) + ',' + str(y) + ',' + str(z))
       -                                self.f_v[x,y,z,0] = numpy.fromfile(fh, dtype=numpy.float64, count=1)
       -                                #print(numpy.fromfile(fh, dtype=numpy.float64, count=1))
       -                                self.f_v[x,y,z,1] = numpy.fromfile(fh, dtype=numpy.float64, count=1)
       -                                #print(numpy.fromfile(fh, dtype=numpy.float64, count=1))
       -                                self.f_v[x,y,z,2] = numpy.fromfile(fh, dtype=numpy.float64, count=1)
       -                                #print(numpy.fromfile(fh, dtype=numpy.float64, count=1))
       -                                self.f_rho[x,y,z] = numpy.fromfile(fh, dtype=numpy.float64, count=1)
       -                                #print(numpy.fromfile(fh, dtype=numpy.float64, count=1))
       -
       +                                self.f_v[x,y,z,0] = \
       +                                numpy.fromfile(fh, dtype=numpy.float64, count=1)
       +                                self.f_v[x,y,z,1] = \
       +                                numpy.fromfile(fh, dtype=numpy.float64, count=1)
       +                                self.f_v[x,y,z,2] = \
       +                                numpy.fromfile(fh, dtype=numpy.float64, count=1)
       +                                self.f_rho[x,y,z] = \
       +                                numpy.fromfile(fh, dtype=numpy.float64, count=1)
        
                finally:
                    if fh is not None:
       t@@ -1430,6 +1428,8 @@ class Spherebin:
                    verbose=True):
                'Render all output files that belong to the simulation, determined by sid.'
        
       +        print("Rendering {} images with the raytracer".format(self.sid))
       +
                quiet = ""
                if (verbose == False):
                    quiet = "-q"
       t@@ -2211,6 +2211,8 @@ def visualize(project, method = 'energy', savefig = True, outformat = 'png'):
                    ax10.legend(('$\sum E_{pot}$','$\sum E_{kin}$','$\sum E_{rot}$'), 'upper right', shadow=True)
                    ax10.grid()
        
       +            fig.tight_layout()
       +
            elif method == 'walls':
        
                # Read energy values from project binaries