Change decimal separator when plotting with PyPlot (or PythonPlot)

Following @Palli’s advice on Windows 11, produces:

using PythonPlot, PythonCall

pyplot.rcParams["axes.formatter.use_locale"] = "True"
loc = pyimport("locale")
loc.setlocale(loc.LC_NUMERIC, "de_DE")
x = -1000:100:20000
plot(x, atanh.(x/20e3))

PythonPlot_commas_dots_locale

Linking also this related thread.

4 Likes