diff --git a/sumo/plotting/__init__.py b/sumo/plotting/__init__.py index 1a1e27b4..2e9aab9f 100644 --- a/sumo/plotting/__init__.py +++ b/sumo/plotting/__init__.py @@ -169,7 +169,7 @@ def power_tick(val, pos, times_sign=r"\times"): coeff = val / 10**exponent prec = 0 if coeff % 1 == 0 else 1 - return rf"$\mathregular{{{coeff:.{prec}f} {times_sign} 10^{exponent:2d}}}$" + return rf"${coeff:.{prec}f}\mathrm{{{times_sign}}}10^{{{exponent:2d}}}$" def colorline( diff --git a/sumo/plotting/optics_plotter.py b/sumo/plotting/optics_plotter.py index 03096334..5e4d3ac0 100644 --- a/sumo/plotting/optics_plotter.py +++ b/sumo/plotting/optics_plotter.py @@ -243,12 +243,8 @@ def get_plot( if spectrum_key == "absorption": font = findfont(FontProperties(family=["sans-serif"])) - if "Whitney" in font: - times_sign = "x" - else: - times_sign = r"\times" ax.yaxis.set_major_formatter( - FuncFormatter(curry_power_tick(times_sign=times_sign)) + FuncFormatter(curry_power_tick(times_sign=r"\times")) ) ax.yaxis.set_major_locator(MaxNLocator(5))