Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: How to substitute decimal dot with decimal comma in

12 views
Skip to first unread message

Tomas Garza

unread,
May 21, 2013, 12:03:03 AM5/21/13
to

Try the following example:
ListPlot[Table[j,{j,0.5,10,1}]]
Define the ticks as strings (check the online Help for Ticks in the details section). Use StringReplace (cf. the online Help browser) to change the dot for a comma on each of them:
tks=Table[j,{j,0.5,10,1}];
ListPlot[Table[j,{j,0.5,10,1}],Ticks->{Transpose[{tks,StringReplace[#,"."->","]&/@ToString/@tks}],Automatic}]
-Tomas



> From: igor.ko...@gmail.com
> Subject: How to substitute decimal dot with decimal comma in Plot ticks?
> To: math...@smc.vnet.net
> Date: Mon, 20 May 2013 05:05:12 -0400
>
> Is it possible to substitute decimal dots by decimal commas on Plot axes? I need to make that substitution in all routines (Plot, LogPlot, LogLogPlot, e.t.c.) at ones since in my native language decimal comma is used instead of decimal dot as it is in English.
>



Bob Hanlon

unread,
May 21, 2013, 12:02:41 AM5/21/13
to

Mathematica | Preferences... | Appearance | Numbers | Formatting | Enable
automatic number formatting: checked; Decimal Point Character: Comma


$Version


"9.0 for Mac OS X x86 (64-bit) (January 24, 2013)"


Note that the inputs shown below are shown as InputForm; if the cells are
either StandardForm or TraditionalForm, the periods display as commas.


Plot[x^2, {x, 0.001, 0.1}]


LogPlot[x^2, {x, 0.001, 0.1}]


However, x axis number formatting fails in LogLogPlot (note that this also
fails for LogLogPlot using Mathematica 8.0.4.0 on my Mac).


LogLogPlot[x^2, {x, 0.001, 0.1}]
0 new messages