<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 FatbandsPlot
Step1:  For this notebook we will create a toy "Boron nitride" tight binding
Step2:  Note that we could have obtained this hamiltonian from any other source. Then we generate a path for the band structure
Step3:  And finally we just ask for the fatbands plot
Step4:  We only see the bands here, but this is a fatbands plot, and it is ready to accept your requests on what to draw!
Requesting specific weights
The fatbands that the plot draws are controlled by the groups setting.
Step5:  This setting works exactly like the requests setting in PdosPlot, which is documented here. Therefore we won't give an extended description of it, but just quickly show that you can autogenerate the groups
Step6:  Or write them yourself if you want the maximum flexibility
Step7:  Scaling fatbands
The visual appeal of fatbands depends a lot on the size of your plot, therefore there's one global scale setting that scales all fatbands at the same time
Step8:  You can also use the scale_fatbands method, which additionally lets you choose if you want to rescale from the current size or just set the value of scale
Step9:  Use BandsPlot settings
All settings of BandsPlot work as well for FatbandsPlot. Even spin texture!
We hope you enjoyed what you learned!
This next cell is just to create the thumbnail for the notebook in the docs
<ASSISTANT_TASK:>
Python Code:
import sisl
import sisl.viz
Explanation: FatbandsPlot
End of explanation
# First, we create the geometry
BN = sisl.geom.graphene(atoms=["B", "N"])
# Create a hamiltonian with different on-site terms
H = sisl.Hamiltonian(BN)
H[0, 0] = 2
H[1, 1] = -2
H[0, 1] = -2.7
H[1, 0] = -2.7
H[0, 1, (-1, 0)] = -2.7
H[0, 1, (0, -1)] = -2.7
H[1, 0, (1, 0)] = -2.7
H[1, 0, (0, 1)] = -2.7
Explanation: For this notebook we will create a toy "Boron nitride" tight binding:
End of explanation
band = sisl.BandStructure(H, [[0., 0.], [2./3, 1./3],
                              [1./2, 1./2], [1., 1.]], 301,
                              [r'$\Gamma$', 'K', 'M', r'$\Gamma$'])
Explanation: Note that we could have obtained this hamiltonian from any other source. Then we generate a path for the band structure:
End of explanation
fatbands = band.plot.fatbands()
fatbands
Explanation: And finally we just ask for the fatbands plot:
End of explanation
print(fatbands.get_param("groups").help)
Explanation: We only see the bands here, but this is a fatbands plot, and it is ready to accept your requests on what to draw!
Requesting specific weights
The fatbands that the plot draws are controlled by the groups setting.
End of explanation
fatbands.split_groups(on="species")
Explanation: This setting works exactly like the requests setting in PdosPlot, which is documented here. Therefore we won't give an extended description of it, but just quickly show that you can autogenerate the groups:
End of explanation
fatbands.update_settings(groups=[
    {"species": "N", "color": "blue", "name": "Nitrogen"},
    {"species": "B", "color": "red", "name": "Boron"}
])
Explanation: Or write them yourself if you want the maximum flexibility:
End of explanation
fatbands.update_settings(scale=2)
Explanation: Scaling fatbands
The visual appeal of fatbands depends a lot on the size of your plot, therefore there's one global scale setting that scales all fatbands at the same time:
End of explanation
fatbands.scale_fatbands(0.5, from_current=True)
Explanation: You can also use the scale_fatbands method, which additionally lets you choose if you want to rescale from the current size or just set the value of scale:
End of explanation
thumbnail_plot = fatbands
if thumbnail_plot:
    thumbnail_plot.show("png")
Explanation: Use BandsPlot settings
All settings of BandsPlot work as well for FatbandsPlot. Even spin texture!
We hope you enjoyed what you learned!
This next cell is just to create the thumbnail for the notebook in the docs
End of explanation
<END_TASK>