Tutorial: Plotting projected electronic band structures with colormap scaling
In this tutorial for SrTiO3, we show how to upload your band-structure files, select orbital projections, and visualize projected bands using continuous colormap encoding.
Step 1: Select files, set Fermi energy, and parse #
Start by selecting the appropriate files for your simulation workflow and entering the Fermi energy.
Use the files required by your code setup and include optional structure or k-path files when
available (e.g. POSCAR).
After selecting files, click Parse. Even though this looks like a file-upload step, your simulation files do not leave your computer. Parsing and plotting are done locally in your browser.
Step 2: Set energy and k-path limits and navigate with zoom sliders #
Limits
Click Plot to generate a baseline figure, then refine the view with Limits in the right sidebar. In this example, use y-limits from -5 eV to 10 eV.
You can also set x-limits by high-symmetry-point index: instead of exact k values, provide integers for the starting and ending high-symmetry points.
Navigation
Use the zoom sliders to focus on specific energy and k-point ranges. Drag slider handles to zoom in or out, and move the selected window to inspect different parts of the band structure.
Step 3: Add filters and choose colormap controls #
Click Add Filter to create a projection trace. Then select the ion/orbital contributions you want to show in the projection table.
In the filter card, set coloring mode to Colormap, choose a colormap (for example jet), and tune vmin/vmax to control how projection weights map to color intensity.
The colormap dropdown is searchable, so you can quickly find maps by name. For examples and guidance, see the Matplotlib colormap reference: Matplotlib Colormaps. If you want the opposite gradient direction, enable the Reverse checkbox.
With Auto enabled, vmin and vmax are set from the minimum and maximum projection values found in the selected input data. The Show value checkbox adds numeric values to the colorbar legend (called visualMap in ECharts).
Step 4: Example projection for SrTiO3 #
In this example, we use one filters, the p orbital of the Oxygen atoms. For colormap, we use
jet.
Legend labels can be entered manually, or you can leave them blank and use auto-generated labels based on the selected ions/orbitals.
After adjusting the selected filters click on plot to generate the projected electronic band structure.
Step 5: Show and tune legend and colorbar settings #
The legend tile inside each filter card still controls per-filter legend styling, including label text, color, weight, and style. If you leave the label empty, DFT Hub can auto-generate the label from the selected projection.
The Color bar panel in the right sidebar controls global colorbar settings
(visualMap in ECharts), including position and layout options such as
loc X. and loc Y..
A good rule of thumb is: use the filter legend tile to describe what each contribution means, and use the Color bar panel to control how the color scale is displayed on the figure.
In the Color bar panel, Bar settings control placement and size
(Loc. X, Loc. Y, orientation, length, width, and gap), while
Text settings control readability (label font style, numeric precision, and text gap).
When working with several filters, first finalize each filter label in the legend tile, then adjust the Color bar position and text settings so all colorbars are easy to scan and do not overlap with the plot area.
Step 6: Customization and styling #
For axis, legend, font, colors, and other appearance controls, use the right sidebar and see the full settings reference in Plot Settings.
Step 7: Export the figure #
When your figure is ready, click the download button in the chart toolbar to export it. Use this to save a clean image for reports, slides, or publications.