Open leonardedens opened 2 years ago
Hi Leonard, thank you very much for the idea. However I see this maybe a little problematic since the WF weights on the sites highly depend on the system. Also you can easily set your own scale by just simply multiplying your WF by some factor (instead of having it defined by default). For instance you can just:
p = plot.Wavefunction(H, 1000*wf, ...)
Maybe a better approach, that maintains this flexibility, could be to just add some scale argument that by default is something similar to your idea but the user can change it by just passing a different value.
plot.Wavefunction
equates the marker size to the modulus of the complex coefficientsfun
:ax = self.axes.scatter(x, y, s=fun, c=phase, cmap=cmap, vmax=np.pi, vmin=-np.pi)
For my systems, these markers end up being tiny: A better way, in my opinion, would be to plot the normalized coefficients:ax = self.axes.scatter(x, y, s=tsf*fun/np.amax(fun), c=phase, cmap=cmap, vmax=np.pi, vmin=-np.pi)
Hence, the sites of maximum localization will have a marker size oftsf
. To fill a circle of radius 0.7 of the underlying geometry produced byhubbard.plot
(line 200), one needs to determine the transformationtsf
which converts frommpl.patches
units toplt.scatter
units, which will depend on the size of thesisl
geometry. I tried doing this withPatchCollection.get_transform.transform(0.7)
, but it does not give the correct number. Settingtsf=250
approximately fills the circles at the maximally localized sites: