diff --git a/DiffractionGratings/grating3D_parallel_Mmatrix.sh b/DiffractionGratings/grating3D_parallel_Mmatrix.sh
index af003d453206ef87f11a7305eacb535dd296c1b4..91287d8fd7e245dbf7b051f52dc1e9715aa8a902 100644
--- a/DiffractionGratings/grating3D_parallel_Mmatrix.sh
+++ b/DiffractionGratings/grating3D_parallel_Mmatrix.sh
@@ -1,17 +1,17 @@
 #!/bin/bash
 export OPENBLAS_NUM_THREADS=1
 export OMP_NUM_THREADS=1
-
 export NPROC=96
-export lambda_min=400
+
+export nb_lam=100
+export nb_phi=59
+export lambda_min=350
 export lambda_max=800
 export FLAG_TOTAL=0
 export GRATING_CASE="half_ellipsoid"
 export myDir="res_Matrix_nb_lam"$nb_lam"_nb_phi"$nb_phi"_total"$FLAG_TOTAL
-export myFile="run_phideg_values_"$nb_phi".out"
 
 rm -r $myDir
-rm $myFile
 mkdir $myDir
 gmsh grating3D.geo -3 -o grating3D.msh
 
diff --git a/DiffractionGratings/grating3D_postplot_Mmatrix.py b/DiffractionGratings/grating3D_postplot_Mmatrix.py
index 2a9f96e42ae7ec936416648bf6bc3c8cedd868a7..5fe70bc7a0f619bb383da17690c64a86a0c6bc08 100644
--- a/DiffractionGratings/grating3D_postplot_Mmatrix.py
+++ b/DiffractionGratings/grating3D_postplot_Mmatrix.py
@@ -1,6 +1,7 @@
 import numpy as np
 import matplotlib.pyplot as plt
 import matplotlib as mpl
+mpl.font_manager._rebuild()
 plt.rcParams.update({"text.usetex": True})
 
 def add_colorbar(mappable):
@@ -158,6 +159,6 @@ for i in range(4):
         ax.set_rorigin(which_orig)
 plt.subplots_adjust(top=0.92, bottom=0.08, left=0.10, right=0.95, hspace=0.25,wspace=0.35)
 plt.savefig('Mmatrix.jpg')
-plt.savefig('Mmatrix.pdf', bbox_inches='tight', pad_inches=0)
+plt.savefig('Mmatrix.svg')
 plt.show()