ttight_layout call fixes energy plot label overlaps - sphere - GPU-based 3D dis… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 4cc89f81f1466e8ad89bd8e9d2dd2bca89eafa20 | |
parent f6055e5843f8c0fec16b36821c8113dd986f26a9 | |
Author: Anders Damsgaard <[email protected]> | |
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(-) | |
--- | |
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=n… | |
- #print(numpy.fromfile(fh, dtype=numpy.float64,… | |
- self.f_v[x,y,z,1] = numpy.fromfile(fh, dtype=n… | |
- #print(numpy.fromfile(fh, dtype=numpy.float64,… | |
- self.f_v[x,y,z,2] = numpy.fromfile(fh, dtype=n… | |
- #print(numpy.fromfile(fh, dtype=numpy.float64,… | |
- self.f_rho[x,y,z] = numpy.fromfile(fh, dtype=n… | |
- #print(numpy.fromfile(fh, dtype=numpy.float64,… | |
- | |
+ self.f_v[x,y,z,0] = \ | |
+ numpy.fromfile(fh, dtype=numpy.float64, count=… | |
+ self.f_v[x,y,z,1] = \ | |
+ numpy.fromfile(fh, dtype=numpy.float64, count=… | |
+ self.f_v[x,y,z,2] = \ | |
+ numpy.fromfile(fh, dtype=numpy.float64, count=… | |
+ self.f_rho[x,y,z] = \ | |
+ numpy.fromfile(fh, dtype=numpy.float64, count=… | |
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 … | |
+ 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… | |
ax10.legend(('$\sum E_{pot}$','$\sum E_{kin}$','$\sum E_{rot}$'), … | |
ax10.grid() | |
+ fig.tight_layout() | |
+ | |
elif method == 'walls': | |
# Read energy values from project binaries |