3

How can I change the number point from . to , in CustomTicks ? The Mathematica built-in function

NumberForm[Plot[…],NumberPoint -> ","]

doesn't work any more, if you use e.g. LinTicks.

Sektor
  • 3,320
  • 7
  • 27
  • 36
lindfu
  • 31
  • 1
  • 2
    Hi, you can manage Ticks in ways that are described here or in the related topics that are linked in this question. – Kuba Oct 05 '13 at 17:15

2 Answers2

7

Update

Here is a better way. FixedPointForm is used to format the tick numbers. Its default options include NumberPoint -> ".":

Options[FixedPointForm]
(* {NumberSigns -> {"-", ""}, NumberPoint -> ".", SignPadding -> False, Debug -> False} *)

Reset the NumberPoint option as desired:

SetOptions[FixedPointForm, NumberPoint -> ","];
Plot[E^x Sin[10 x], {x, -1, 1}, Ticks -> LinTicks]

Original

The question, CustomTicks and small ranges, shows one can pass a formatting function to LinTicks:

Plot[E^x Sin[10 x], {x, -1, 1}, 
 Ticks ->
   (LinTicks[##, TickLabelFunction -> (NumberForm[#, {2, 1}, NumberPoint -> ","] &)] &)]

Mathematica graphics

[A weakness in the original solution is having to set the number form explicitly instead of automatically.]

Michael E2
  • 235,386
  • 17
  • 334
  • 747
6

Unless the number point is explicit in this tick package can't you just use Style to override the global setting? e.g

enter image description here

and

Style[
 Plot[E^x Sin[10 x], {x, -1, 1}],
 NumberPoint -> "CC"]

enter image description here

Mike Honeychurch
  • 37,541
  • 3
  • 85
  • 158
  • 1
    Nice, +1, I didn't know that NumberPoint is option for Style. But since it is you can also use BaseStyle -> {NumberPoint -> ","} – Kuba Oct 06 '13 at 20:44