matplotlibの数式設定
matplotlib.pyplotの数式設定
https://matplotlib.org/stable/users/explain/text/usetex.html
いろいろやるには、ext.usetexをTrueにするのが楽そう
$ \LaTeXをinstallしておく必要あり
https://matplotlib.org/stable/users/explain/customizing.html#customizing-with-matplotlibrc-files
code:.matplotlibrc (抜粋)
## ***************************************************************************
## * LaTeX *
## ***************************************************************************
## For more information on LaTeX properties, see
## https://matplotlib.org/stable/users/explain/text/usetex.html
#text.usetex: False # use latex for all text handling. The following fonts
# are supported through the usual rc parameter settings:
# new century schoolbook, bookman, times, palatino,
# zapf chancery, charter, serif, sans-serif, helvetica,
# avant garde, courier, monospace, computer modern roman,
# computer modern sans serif, computer modern typewriter
#text.latex.preamble: # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES
# AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP
# IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO.
# text.latex.preamble is a single line of LaTeX code that
# will be passed on to the LaTeX system. It may contain
# any code that is valid for the LaTeX "preamble", i.e.
# between the "\documentclass" and "\begin{document}"
# statements.
# Note that it has to be put on a single line, which may
# become quite long.
# The following packages are always loaded with usetex,
# so beware of package collisions:
# geometry, inputenc, type1cm.
# PostScript (PSNFSS) font packages may also be
# loaded, depending on your font settings.
## The following settings allow you to select the fonts in math mode.
#mathtext.fontset: dejavusans # Should be 'dejavusans' (default),
# 'dejavuserif', 'cm' (Computer Modern), 'stix',
# 'stixsans' or 'custom'
## "mathtext.fontset: custom" is defined by the mathtext.bf, .cal, .it, ...
## settings which map a TeX font name to a fontconfig font pattern. (These
## settings are not used for other font sets.)
#mathtext.bf: sans:bold
#mathtext.bfit: sans:italic:bold
#mathtext.cal: cursive
#mathtext.it: sans:italic
#mathtext.rm: sans
#mathtext.sf: sans
#mathtext.tt: monospace
#mathtext.fallback: cm # Select fallback font from ['cm' (Computer Modern), 'stix'
# 'stixsans'] when a symbol cannot be found in one of the
# custom math fonts. Select 'None' to not perform fallback
# and replace the missing character by a dummy symbol.
#mathtext.default: it # The default font to use for math.
# Can be any of the LaTeX font names, including
# the special name "regular" for the same font
# used in regular text.
#2025-05-21 11:14:48