3
$\begingroup$

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.

$\endgroup$
  • 2
    $\begingroup$ Hi, you can manage Ticks in ways that are described here or in the related topics that are linked in this question. $\endgroup$ – Kuba Oct 5 '13 at 17:15
7
$\begingroup$

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.]

$\endgroup$
6
$\begingroup$

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

$\endgroup$
  • 1
    $\begingroup$ Nice, +1, I didn't know that NumberPoint is option for Style. But since it is you can also use BaseStyle -> {NumberPoint -> ","} $\endgroup$ – Kuba Oct 6 '13 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.