Using comma as decimal separator

Hello,

Sorry if this question was answered before. I did a search in the
mailing list archives but couldn't find any answer.

Is there an easy way to use comma as a decimal separator in texts,
especially in tick labels? I know that it is possible to user
formatters to do that, but I was wondering if there is an automatic
setting or something that could be applied to axes instances, as I
have more than 200 scripts to generate plots and I don't want to
edit every one of them. Maybe there is a TeX setting (I uset
usetex=True)?

I tried setting locales, but it didn't work. I also tried to
process the texts in the tick labels, but that didn't work also.
Maybe I am overseeing something, but any hint would help.

Thanks in advance:

···

---
José Alexandre Nalon
nalon@...166...

There isn't a really good way to do this at present. Maybe someone can suggest a workaround that doesn't require modifying matplotlib.

However, I was able to produce a patch that will respect the user's current locale here:

Cheers,
Mike

···

On 07/28/2011 06:46 PM, Jos� Alexandre Nalon wrote:

Hello,

Sorry if this question was answered before. I did a search in the
mailing list archives but couldn't find any answer.

Is there an easy way to use comma as a decimal separator in texts,
especially in tick labels? I know that it is possible to user
formatters to do that, but I was wondering if there is an automatic
setting or something that could be applied to axes instances, as I
have more than 200 scripts to generate plots and I don't want to
edit every one of them. Maybe there is a TeX setting (I uset
usetex=True)?

I tried setting locales, but it didn't work. I also tried to
process the texts in the tick labels, but that didn't work also.
Maybe I am overseeing something, but any hint would help.

Thanks in advance:

---
Jos� Alexandre Nalon
nalon@...166...

------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Hello,

Thanks for your work! But, since I don't have much experience
with dealing with the sources and compiling, I don't know
exactly how to apply this patch. Is there a guide to applying
patches to matplotlib or something like that? Any help will
be appreciated.

···

---
José Alexandre Nalon
nalon@...166...

Em 29/07/2011, às 12:08, Michael Droettboom escreveu:

There isn't a really good way to do this at present. Maybe someone can
suggest a workaround that doesn't require modifying matplotlib.

However, I was able to produce a patch that will respect the user's
current locale here:

https://github.com/matplotlib/matplotlib/pull/410

Cheers,
Mike

On 07/28/2011 06:46 PM, José Alexandre Nalon wrote:

Hello,

Sorry if this question was answered before. I did a search in the
mailing list archives but couldn't find any answer.

Is there an easy way to use comma as a decimal separator in texts,
especially in tick labels? I know that it is possible to user
formatters to do that, but I was wondering if there is an automatic
setting or something that could be applied to axes instances, as I
have more than 200 scripts to generate plots and I don't want to
edit every one of them. Maybe there is a TeX setting (I uset
usetex=True)?

I tried setting locales, but it didn't work. I also tried to
process the texts in the tick labels, but that didn't work also.
Maybe I am overseeing something, but any hint would help.

Thanks in advance:

---
José Alexandre Nalon
nalon@...166...

------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

You need to be able to build matplotlib from source (which implies having a compiler etc., which may or may not be easy on your platform). The basic instructions for building from source are here:

http://matplotlib.sourceforge.net/users/installing.html

and the branch containing the locale fix is available for git checkout or download as a tarball here:

https://github.com/mdboom/matplotlib/tree/locale_formatting

Mike

···

On 07/29/2011 01:14 PM, Jos� Alexandre Nalon wrote:

Hello,

Thanks for your work! But, since I don't have much experience
with dealing with the sources and compiling, I don't know
exactly how to apply this patch. Is there a guide to applying
patches to matplotlib or something like that? Any help will
be appreciated.

---
Jos� Alexandre Nalon
nalon@...166...

Em 29/07/2011, �s 12:08, Michael Droettboom escreveu:

There isn't a really good way to do this at present. Maybe someone can
suggest a workaround that doesn't require modifying matplotlib.

However, I was able to produce a patch that will respect the user's
current locale here:

https://github.com/matplotlib/matplotlib/pull/410

Cheers,
Mike

On 07/28/2011 06:46 PM, Jos� Alexandre Nalon wrote:

Hello,

Sorry if this question was answered before. I did a search in the
mailing list archives but couldn't find any answer.

Is there an easy way to use comma as a decimal separator in texts,
especially in tick labels? I know that it is possible to user
formatters to do that, but I was wondering if there is an automatic
setting or something that could be applied to axes instances, as I
have more than 200 scripts to generate plots and I don't want to
edit every one of them. Maybe there is a TeX setting (I uset
usetex=True)?

I tried setting locales, but it didn't work. I also tried to
process the texts in the tick labels, but that didn't work also.
Maybe I am overseeing something, but any hint would help.

Thanks in advance:

---
Jos� Alexandre Nalon
nalon@...166...

------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options