diff --git a/kwant/plotter.py b/kwant/plotter.py index 03201259b96164ed1978ec3c9df8b518b7d3cd3c..ae9cb73bd53acdaed3b2f6ac0ef78fdef7afb209 100644 --- a/kwant/plotter.py +++ b/kwant/plotter.py @@ -1253,12 +1253,12 @@ def plot(sys, num_lead_cells=2, unit='nn', fig.set_figheight(fig_size[1]) if dim == 2: - ax = fig.add_subplot(111, aspect='equal', adjustable='datalim') + ax = fig.add_subplot(1, 1, 1, aspect='equal', adjustable='datalim') ax.set_xmargin(0.05) ax.set_ymargin(0.05) else: warnings.filterwarnings('ignore', message=r'.*rotation.*') - ax = fig.add_subplot(111, projection='3d') + ax = fig.add_subplot(1, 1, 1, projection='3d') warnings.resetwarnings() else: fig = None @@ -1472,7 +1472,7 @@ def map(sys, value, colorbar=True, cmap=None, vmin=None, vmax=None, a=None, if fig_size is not None: fig.set_figwidth(fig_size[0]) fig.set_figheight(fig_size[1]) - ax = fig.add_subplot(111, aspect='equal', adjustable='datalim') + ax = fig.add_subplot(1, 1, 1, aspect='equal', adjustable='datalim') # Note that we tell imshow to show the array created by mask_interpolate # faithfully and not to interpolate by itself another time. @@ -1536,7 +1536,7 @@ def bands(sys, momenta=65, args=(), file=None, show=True, dpi=None, if fig_size is not None: fig.set_figwidth(fig_size[0]) fig.set_figheight(fig_size[1]) - ax = fig.add_subplot(111) + ax = fig.add_subplot(1, 1, 1) ax.plot(momenta, energies) return output_fig(fig, file=file, show=show)