From dadd7489a9d23e85dfd0dfb1506a54d4faa98c7a Mon Sep 17 00:00:00 2001
From: Joseph Weston <joseph@weston.cloud>
Date: Wed, 12 Jun 2019 12:05:08 +0200
Subject: [PATCH] use plotter.density instead of plotter.map in tutorial

Closes #214.
---
 doc/source/code/figure/discretize.py.diff       | 6 +++---
 doc/source/code/figure/magnetic_texture.py.diff | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/source/code/figure/discretize.py.diff b/doc/source/code/figure/discretize.py.diff
index aebaf3e0..3d599927 100644
--- a/doc/source/code/figure/discretize.py.diff
+++ b/doc/source/code/figure/discretize.py.diff
@@ -63,7 +63,7 @@
  
      ham = syst.hamiltonian_submatrix(params=dict(V=potential), sparse=True)
      evecs = scipy.sparse.linalg.eigsh(ham, k=10, which='SM')[1]
-     kwant.plotter.map(syst, abs(evecs[:, n])**2, show=False)
+     kwant.plotter.density(syst, abs(evecs[:, n])**2, show=False)
  #HIDDEN_END_plot_eigenstate
 -    plt.show()
 +    save_figure('discretizer_gs')
@@ -136,8 +136,8 @@
      rho_sz = sum(spin_density(psi) for psi in wf(0))  # states from left lead
  
      fig, (ax1, ax2) = plt.subplots(1, 2, sharey=True, figsize=(16, 4))
-     kwant.plotter.map(syst, wf_sqr, ax=ax1)
-     kwant.plotter.map(syst, rho_sz, ax=ax2)
+     kwant.plotter.density(syst, wf_sqr, ax=ax1)
+     kwant.plotter.density(syst, rho_sz, ax=ax2)
  #HIDDEN_END_plot_qsh_wf
      ax = ax1
      im = [obj for obj in ax.get_children()
diff --git a/doc/source/code/figure/magnetic_texture.py.diff b/doc/source/code/figure/magnetic_texture.py.diff
index a29a458e..c9c8d96c 100644
--- a/doc/source/code/figure/magnetic_texture.py.diff
+++ b/doc/source/code/figure/magnetic_texture.py.diff
@@ -119,7 +119,7 @@
 +def plot_densities(syst, densities, fname=None):
 +    fig, axes = plt.subplots(1, len(densities), figsize=(7*len(densities), 7))
      for ax, (title, rho) in zip(axes, densities):
-         kwant.plotter.map(syst, rho, ax=ax, a=4)
+         kwant.plotter.density(syst, rho, ax=ax)
          ax.set_title(title)
 -    plt.show()
 +    if fname:
-- 
GitLab