From cbfce9f87157be2cd5d33378595d6a68697d6ddd Mon Sep 17 00:00:00 2001 From: Daniel Nagel Date: Thu, 7 Aug 2025 13:33:10 +0000 Subject: [PATCH] Fix underscore in cmaps --- docs/gallery/cmaps.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/gallery/cmaps.py b/docs/gallery/cmaps.py index 57a49ab..40f075a 100644 --- a/docs/gallery/cmaps.py +++ b/docs/gallery/cmaps.py @@ -40,7 +40,8 @@ def plot_color_gradients(cmap_category, cmap_list): pos = list(ax.get_position().bounds) x_text = pos[0] - 0.01 y_text = pos[1] + pos[3] / 2 - name = name.replace('_', r'\textunderscore{}') + # this is needed when LaTeX text engine is used + # name = name.replace('_', r'\textunderscore{}') fig.text(x_text, y_text, name, va='center', ha='right') # Turn off *all* ticks & spines, not just the ones with colormaps.