Hi Anton

My matplotlib version is 1.5.1. Can I solve this problem by updating the matplotlib package?

I came out another way to get around with this bug. I built a system that has same sites except it is 2-d. Then I plot the wavefunction calculated by 3-d on the 2-d system. It seems works, but I'm not sure whether this is a right way to do. Is this accurate?

Thanks

Sincerely,

Liming

On 27 July 2016 at 00:27, Anton Akhmerov <anton.akhmerov+kd@gmail.com> wrote:

Hi Liming,

I believe this is related to a known outstanding bug:

https://gitlab.kwant-project.org/kwant/kwant/issues/39

What version of matplotlib you are using?

Best,

Anton

On Wed, Jul 20, 2016 at 2:58 AM, L.M J <heysuperming@gmail.com> wrote:

> Dear all

>

> I was trying to plot the wavefunction on each site of a 3-D lattice and each

> site is described by a 4x4 matrix. However, it turned out the that plotted

> wave function is overlapped with the surrounding site and I could not

> identify the magnitude of wave function on each site. The code I had

> implemented for plotting was the same as the codes in

> "http://kwant-project.org/doc/1.0/tutorial/tutorial6" with a copy of

> specific plot command as below.

>

> I have varied the value "3" before wf[i] to tune the size however it turned

> out this value cannot tune the plot size of the wavefunction. I think I'm

> not doing it correctly.

>

> def site_size(i):

> return 3 * wf[i] / wf.max()

>

> kwant.plot(sys, site_size=site_size, site_color=(0, 0, 1, 0.3),

> hop_lw=0.1)

>

> This method works perfectly for 2-D lattice plot. However, it cannot display

> the wavefunction properly in 3-d lattice. My question is, how can I plot the

> wavefunction in 3-d lattice clearly? (Or maybe I can force the kwant to plot

> it in 2-d by configuring the kwant.plot?)

>

> Thank you for advance.

>

> Sincerely,

>

> Liming