Skip to content

plot.Wavefunction marker size #124

@leonardedens

Description

@leonardedens

plot.Wavefunction equates the marker size to the modulus of the complex coefficients fun:
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:
image
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 of tsf.
To fill a circle of radius 0.7 of the underlying geometry produced by hubbard.plot (line 200), one needs to determine the transformation tsf which converts from mpl.patches units to plt.scatter units, which will depend on the size of the sisl geometry. I tried doing this with PatchCollection.get_transform.transform(0.7), but it does not give the correct number.
Setting tsf=250 approximately fills the circles at the maximally localized sites:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions