Changing tick labels to percent
You can use PercentForm
to express tick labels in percents:
ticks = {#, ToString[PercentForm[#]]} & /@ Range[0, 1, .1];
Plot[x, {x, 0, 1}, Ticks -> {Automatic, ticks }]
Alternatively, you can use Quantity[x, "Percent"]
to get x%
:
ticks2 = {#, ToString[Quantity[100 #, "Percent"], StandardForm]} & /@ Range[0, 1, 1/10];
Plot[x, {x, 0, 1}, Ticks -> {Automatic, ticks2}]
same picture
Update: To label only major ticks:
tickF = Charting`ScaledTicks["Linear"][##] /.
{a_, _NumberForm, b___} :> {a, ToString @ PercentForm[a], b} &;
Plot[x, {x, 0, 1}, Ticks -> {Automatic,tickF}]
You can add the option
Ticks -> {Automatic, Transpose@{Range[0., 1., 0.1], ToString[#] <> "%" & /@ Range[0, 100, 10]}}
For example
Plot[x, {x, 0, 1}, Ticks -> {Automatic, Transpose@{Range[0., 1., 0.1], ToString[#] <> "%" & /@ Range[0, 100, 10]}}]
Or for a more general range of data we can use a function in Ticks
percentticks[ymin_, ymax_] := Transpose@{Range[ymin, ymax, (ymax - ymin)/10.], ToString[#] <> "%" & /@ Range[0, 100, 10]}
Plot[x, {x, 0, 10}, Ticks -> {Automatic, percentticks}]