tclose figures after plotting - 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 f73401bfc49a6ec1b759a25f8bd89f11b7b24fac
 (DIR) parent e7347a2b105dd2f226eb765ce7a1ab45cb6fdc60
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Thu, 22 Jan 2015 10:34:48 +0100
       
       close figures after plotting
       
       Diffstat:
         M python/sphere.py                    |       8 +++++---
       
       1 file changed, 5 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/python/sphere.py b/python/sphere.py
       t@@ -5959,7 +5959,7 @@ class sim:
                            ax3.plot(time, self.tau_eff/1000.0,
                                    ':k', label="$\\tau'$")
                            ax3.set_ylabel('Stress [kPa]')
       -                    ax3.legend()
       +                    ax3.legend(loc='upper left')
                        else:
                            ax3.plot(time, self.tau_eff/self.w_sigma0[0],
                                    '-k', label="$Shear friction$")
       t@@ -5978,12 +5978,13 @@ class sim:
                            #ax4color = '#666666'
                            ax4color = ax2color
                            ax4.plot(time, self.p_f_bar/1000.0, color=ax4color,
       -                            label='Pressure')
       +                            label='$\\bar{p}_\\text{f}$')
                            ax4.set_ylabel('Mean fluid pressure '
                                    + '$\\bar{p_\\text{f}}$ [kPa]')
                            for tl in ax4.get_yticklabels():
                                tl.set_color(ax4color)
       -
       +                    if self.w_sigma0_A > 1.0e-3:
       +                        ax4.legend(loc='upper right')
        
                        # aesthetics
                        ax3.set_xlabel('Time [s]')
       t@@ -6084,6 +6085,7 @@ class sim:
                        fig.savefig(filename)
                        print(filename)
                        fig.clf()
       +                plt.close()
                    else:
                        plt.show()