diff --git a/plots/01_heliostat_position.py b/plots/01_heliostat_position.py index c69bb15..4335166 100755 --- a/plots/01_heliostat_position.py +++ b/plots/01_heliostat_position.py @@ -172,7 +172,7 @@ def plot_heliostat_positions(self) -> None: cmap=custom_cmap, alpha=0.7, ) - fig.colorbar(scatter, label="# Measurements") + fig.colorbar(scatter, label="\# Measurements") ax.grid(True) # Draw tower boundaries as rectangles. diff --git a/plots/03_create_dataset_split_plot_by_split.py b/plots/03_create_dataset_split_plot_by_split.py index 6f33e0c..765ab2f 100644 --- a/plots/03_create_dataset_split_plot_by_split.py +++ b/plots/03_create_dataset_split_plot_by_split.py @@ -171,7 +171,7 @@ def main( kind="bar", stacked=True, ax=ax, legend=False, color=bar_colors ) # Change the x-axis label as requested. - ax.set_xlabel("Heliostats sorted by # measurements available") + ax.set_xlabel("Heliostats sorted by \# measurements available") ax.set_ylabel("Count") ax.tick_params(axis="x", rotation=45) ticks = list(range(0, num_heliostats, 200)) diff --git a/plots/plot_utils.py b/plots/plot_utils.py index 1583285..db59d85 100644 --- a/plots/plot_utils.py +++ b/plots/plot_utils.py @@ -6,8 +6,9 @@ def set_plot_style() -> None: """Set global plot style for all plots.""" - mpl.rcParams["font.family"] = "sans-serif" - mpl.rcParams["font.sans-serif"] = ["DejaVu Sans"] + # Set Plot style. + mpl.rcParams["text.usetex"] = True + mpl.rcParams["text.latex.preamble"] = r"\usepackage{cmbright}" mpl.rcParams["font.size"] = 12 mpl.rcParams["axes.titlesize"] = 14 mpl.rcParams["axes.labelsize"] = 12 @@ -15,6 +16,8 @@ def set_plot_style() -> None: mpl.rcParams["xtick.labelsize"] = 10 mpl.rcParams["ytick.labelsize"] = 10 mpl.rcParams["legend.fontsize"] = 10 + mpl.rcParams["pdf.fonttype"] = 42 + mpl.rcParams["ps.fonttype"] = 42 def decimal_to_dms(value: float, is_latitude: bool = True) -> str: