Titles and axis labels¶
Python¶
Create the axes in their final layout. Plot each dataset. Then supply one title and one axis label for each panel:
import matplotlib.pyplot as plt
import erlab.plotting as eplt
fig, axes = plt.subplots(1, 2, figsize=(6.4, 3.0), layout="compressed")
eplt.plot_array(
constant_energy_map,
ax=axes[0],
cmap="Greys",
gamma=0.5,
aspect="equal",
)
axes[1].plot(edc.eV, edc, color="0.2")
eplt.fermiline(ax=axes[1], orientation="v", linestyle="--")
eplt.set_titles(axes, ["Constant energy map", "Energy distribution curve"])
eplt.set_xlabels(axes, [r"$k_x$ (Å$^{-1}$)", r"$E-E_F$ (eV)"])
eplt.set_ylabels(axes, [r"$k_y$ (Å$^{-1}$)", "Intensity (arb. units)"])
The default sequence is row-major. Use order="F" when the labels must follow the
columns first. The number of labels must match the number of axes. Pass one string when
all panels need the same label.
See erlab.plotting.set_titles(), erlab.plotting.set_xlabels(), and
erlab.plotting.set_ylabels() for text-formatting arguments.
Figure Composer¶
Add constant_energy_map and edc to the figure as sources. Then create this ordered
recipe:
In Layout, select subplots. Set Rows to
1and Columns to2.Add an Image Plot step for
constant_energy_mapon the left axes. Set Aspect toequal.Add a Line/Profile step for
edcon the right axes.Add an ERLab Method step on the right axes. Select
fermiline, and set Orientation tov.Add an ERLab Method step on both axes. Select
set_titles, keep Order set to C (Row), and enterConstant energy mapandEnergy distribution curveon separate lines in Text.Add another ERLab Method step on both axes. Select
set_xlabels, and enter$k_x$ (Å$^{-1}$)and$E-E_F$ (eV)on separate lines in Text.Add another ERLab Method step on both axes. Select
set_ylabels, and enter$k_y$ (Å$^{-1}$)andIntensity (arb. units)on separate lines in Text.
Keep the three label steps after the plotting steps. This order replaces labels that a plotting step supplies from the source coordinates.