--- original
+++ modified
@@ -11,6 +11,7 @@
 #    lattice, namely graphene
 
 from __future__ import division  # so that 1/2 == 0.5, and not 0
+import _defs
 from math import pi, sqrt, tanh
 
 import kwant
@@ -97,22 +98,40 @@
         smatrix = kwant.smatrix(sys, energy)
         data.append(smatrix.transmission(0, 1))
 
-    pyplot.figure()
+    fig = pyplot.figure()
     pyplot.plot(energies, data)
-    pyplot.xlabel("energy [t]")
-    pyplot.ylabel("conductance [e^2/h]")
-    pyplot.show()
+    pyplot.xlabel("energy [t]",
+                 fontsize=_defs.mpl_label_size)
+    pyplot.ylabel("conductance [e^2/h]",
+                 fontsize=_defs.mpl_label_size)
+    pyplot.setp(fig.get_axes()[0].get_xticklabels(),
+               fontsize=_defs.mpl_tick_size)
+    pyplot.setp(fig.get_axes()[0].get_yticklabels(),
+               fontsize=_defs.mpl_tick_size)
+    fig.set_size_inches(_defs.mpl_width_in, _defs.mpl_width_in * 3. / 4.)
+    fig.subplots_adjust(left=0.15, right=0.95, top=0.95, bottom=0.15)
+    for extension in ('pdf', 'png'):
+        fig.savefig("graphene_result." + extension, dpi=_defs.dpi)
 
 
 def plot_bandstructure(flead, momenta):
     bands = kwant.physics.Bands(flead)
     energies = [bands(k) for k in momenta]
 
-    pyplot.figure()
+    fig = pyplot.figure()
     pyplot.plot(momenta, energies)
-    pyplot.xlabel("momentum [(lattice constant)^-1]")
-    pyplot.ylabel("energy [t]")
-    pyplot.show()
+    pyplot.xlabel("momentum [(lattice constant)^-1]",
+                 fontsize=_defs.mpl_label_size)
+    pyplot.ylabel("energy [t]",
+                 fontsize=_defs.mpl_label_size)
+    pyplot.setp(fig.get_axes()[0].get_xticklabels(),
+               fontsize=_defs.mpl_tick_size)
+    pyplot.setp(fig.get_axes()[0].get_yticklabels(),
+               fontsize=_defs.mpl_tick_size)
+    fig.set_size_inches(_defs.mpl_width_in, _defs.mpl_width_in * 3. / 4.)
+    fig.subplots_adjust(left=0.15, right=0.95, top=0.95, bottom=0.15)
+    for extension in ('pdf', 'png'):
+        fig.savefig("graphene_bs." + extension, dpi=_defs.dpi)
 
 
 def main():
@@ -124,8 +143,11 @@
     def family_colors(site):
         return 0 if site.family == a else 1
 
-    # Plot the closed system without leads.
-    kwant.plot(sys, site_color=family_colors, site_lw=0.1, colorbar=False)
+    size = (_defs.figwidth_in, _defs.figwidth_in)
+    for extension in ('pdf', 'png'):
+        kwant.plot(sys, site_color=family_colors, site_lw=0.1, colorbar=False,
+                   file="graphene_sys1." + extension,
+                   fig_size=size, dpi=_defs.dpi)
 
     # Compute some eigenvalues.
     compute_evs(sys.finalized())
@@ -134,9 +156,11 @@
     for lead in leads:
         sys.attach_lead(lead)
 
-    # Then, plot the system with leads.
-    kwant.plot(sys, site_color=family_colors, site_lw=0.1,
-               lead_site_lw=0, colorbar=False)
+    size = (_defs.figwidth_in, 0.9 * _defs.figwidth_in)
+    for extension in ('pdf', 'png'):
+        kwant.plot(sys, site_color=family_colors, colorbar=False, site_lw=0.1,
+                   file="graphene_sys2." + extension,
+                   fig_size=size, dpi=_defs.dpi, lead_site_lw=0)
 
     # Finalize the system.
     sys = sys.finalized()
