Physics, Python, Python Programming, Coding, Programming.
ax.contourf(kx_grid, ky_grid, energy_grid[:, :, 1], cmap='viridis', levels=50) # Add a colorbar to the plot cbar = fig.colorbar(contours, ax=ax) cbar.set_label('Energy (eV)') # Label the axes ax.set_xlabel('$k_x$ (1/Å)') ax.set_ylabel('$k_y$ (1/Å)') # Set the aspect ratio to equal