[Matplotlib-users] Issues with numerical formatting in matplotlib

Hendrik Nagel Hendrik.Nagel-p4b at ruhr-uni-bochum.de
Wed Apr 3 07:16:28 EDT 2024


Hey everyone,

a few days ago I updated Python from 3.9 to 3.11.

In 3.9 I created a defaults script for updating the rcParams. One of these
updates is, to change the decimal sign from " . " to " , ". If I run this
script in 3.11, the numerical values get the comma, but it is placed in
curly brackets (see the attached picture).

In my script I change this setting by

 

import locale as lc

lc.setlocale(lc.LC_ALL, 'de_DE')

 

import matplotlib.pyplot as plt

 

plt.rcParams.update({'axes.formatter.use_locale': True})

 

On first research I only find this way to achieve these changes.

Has anyone an idea what causes this bug or has an idea how to fix this?

 

Thanks a lot and best regards

Hendrik

 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/matplotlib-users/attachments/20240403/45410aa9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 52272 bytes
Desc: not available
URL: <https://mail.python.org/pipermail/matplotlib-users/attachments/20240403/45410aa9/attachment-0001.png>


More information about the Matplotlib-users mailing list