Tutorial: Plotting projected electronic band structures with solid color and value-scaled width/size
In this tutorial for SrTiO3, we show how to upload the results of your DFT band-structure files to DFT Hub, select projections, and generate, customize, and export a projected band structure using solid color and value-scaled width/size.
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
You can generate a baseline figure by clicking Plot, then refine the view using 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 solid color + value-scaled width/size #
Click Add Filter to create a filter card. The app automatically enables Plot filtered bands and disables Plot plain bands; you can re-enable plain bands if you want overlays.
Each filter card is an independent projected-band trace. After adding a filter, select the ion, orbital, and (if applicable) spin entries in the projection table for exactly the contribution you want to visualize. You can stack multiple filters to compare different chemical or orbital channels in the same plot.
In each filter card, set coloring mode to Solid color and choose a distinct color for that contribution. Then enable Value-scaled width/size in the Line/Marker panel so projection strength is encoded by line and marker thickness: stronger weights are drawn thicker, weaker weights are drawn thinner.
For meaningful comparisons across multiple filters, keep key style scales consistent across cards, especially line width and marker size. If one filter uses a much larger base size than another, visual differences can come from styling rather than the actual projection weights.
After defining filters, click Plot to render the projected bands. If needed, refine line style, marker type, opacity, and labels in each card before plotting again.
Step 4: Example filter choices for SrTiO3 #
In this example, we use four filters: one for Sr, two for Ti, and one for O. Keep line width and marker size settings consistent across filters for a fair visual comparison.
Example selections:
Sr in red; Ti t2g (dxy, dyz,
dxz) in blue; Ti eg (dz2,
dx2-y2) in cyan; and O in magenta.
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 the legend #
There are two legend-related panels in this workflow. The first is the legend controls inside each filter card, where you can define the filter label text and adjust label styling such as font, color, and style for that specific filter. If you leave the label empty, DFT Hub automatically generates the legend label from the current selection in the filter table.
The second is the global Legend panel in the right sidebar. Use it to show/hide the
legend and control overall placement and frame settings, including loc X.,
loc Y., orientation, border width, and border radius.
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.