two element ticks in a parametricplot

I'm struggling with parametric plot axes ticks edition. I need them to always have one (or two) digits after the coma but now they are like: 0,6 0,8 1, 1,2 1,4 and I need the to be like: 0,6 0,8 1,0 1,2 1,4... Please help!

Example of the code:

f[x_] := x
g[x_] := x

ticksX = Table[x, {x, 0, 4, 0.2}];
ticksY = Table[x, {x, 0, 4, 0.1}];
grids = {Table[x, {x, 0, 3, 0.1}], Table[x, {x, 0, 3, 0.1}]};

Style[ParametricPlot[{f[x], g[x]}, {x, 0, 3},
PlotStyle -> {Thickness[0.003], Black},
AxesLabel -> {Style["n", FontSize -> 12.5, Italic,
FontFamily -> "Times"],
Style["m", FontSize -> 12.5, Italic, FontFamily -> "Times"]},
AxesOrigin -> {0, 0}, PlotRange -> All, AspectRatio -> Automatic,
GridLines -> grids, Ticks -> {ticksX, ticksY},
TicksStyle -> Directive[Black, 12.5, FontFamily -> "Times"],
GridLinesStyle -> {{Gray, Directive[Thickness[0.001]]}, {Gray,
Directive[Thickness[0.001]]}},
AxesStyle -> {{Black, Directive[Thickness[0.002]]}, {Black,
Directive[Thickness[0.002]]}}], NumberPoint -> ","]


1 Answer

something like this? See help for more details on these number formatting functions.

ticksX = Table[{x,
Rotate[Style[NumberForm[x, {2, 1}, NumberPoint -> ","], Red],
90 Degree]}, {x, 0, 4, 0.2}];
ticksY = Table[{x, Style[NumberForm[x, {2, 1}, NumberPoint -> ","], Red]}, {x,
0, 4, 0.1}];

grids = {Table[x, {x, 0, 3, 0.1}], Table[x, {x, 0, 3, 0.1}]};

Framed@ParametricPlot[{f[x], g[x]}, {x, 0, 3},
PlotStyle -> {Thickness[0.003], Black},
AxesLabel -> {Style["n", FontSize -> 12.5, Italic, FontFamily -> "Times"],
Style["m", FontSize -> 12.5, Italic, FontFamily -> "Times"]},
AxesOrigin -> {0, 0},
PlotRange -> All,
AspectRatio -> Automatic,
GridLines -> grids,
Ticks -> {ticksX, ticksY},
TicksStyle -> Directive[Black, 12.5, FontFamily -> "Times"],
GridLinesStyle -> {{Gray, Directive[Thickness[0.001]]}, {Gray,
Directive[Thickness[0.001]]}},
AxesStyle -> {{Black, Directive[Thickness[0.002]]}, {Black,
Directive[Thickness[0.002]]}},
ImagePadding -> 30, ImageSize -> 500]

• That is precisely what I was wondering how to do. Thank You very much. Jan 10, 2016 at 13:06