# What is the default tick mark function for FrameTicks?

According to the documentation of Ticks, a ticks function

The tick mark function func[Subscript[x, min],Subscript[x, max]] may return any other tick mark option

For example,

tickFunc = Subdivide[#1, #2, 6] &;
Plot[x, {x, -0.1, 3}, Frame -> True,
FrameTicks -> {{Automatic, Automatic}, {tickFunc, Automatic}}]


Will show But I want to know what is the default tick mark function when setting Ticks to Automatics?

A simple manipulate like

Manipulate[Plot[x, {x, -0.1, n}, Frame -> True], {n, 1, 200, 1}]


does show some definite feature of ticks, for example, number of ticks is always between 4 and 8. But I failed to construct a tick mark function behave as default. Does anyone have ideas?

• You might be interested in FindDivisions[]: FindDivisions[{-0.1, 3}, {7, 6}] Mar 14, 2018 at 14:00
• Hi, @J.M. I don't quite get it. What do you mean? Mar 14, 2018 at 14:06
• Look carefully at the ticks in Plot[x, {x, -0.1, 3}, Frame -> True], and then look at the result of N[FindDivisions[{-0.1, 3}, {7, 6}]]. Notice anything? Mar 14, 2018 at 14:18
• @J.M. yeah, the division is the same except -0.5. But I still don't understand how to make the default tick mark function. Because, the tick number is changing, not fixed. Mar 14, 2018 at 14:35
• @J.M. Oh, I seems understand what you mean now. Thank you so much! : ) Mar 14, 2018 at 15:01

You can get a fairly close approximation using the internal functions ChartingScaledTicks and ChartingScaledFrameTicks:

GraphicsRow[{
Graphics[
{}, PlotRange->{{0,1},{1,10}},Frame->True,AspectRatio->1
],
Graphics[
{}, PlotRange->{{0,1},{1,10}},Frame->True,AspectRatio->1,
FrameTicks->{
{
ChartingScaledTicks[{Identity,Identity}],
ChartingScaledFrameTicks[{Identity,Identity}]
},
{
ChartingScaledTicks[{Identity,Identity}],
ChartingScaledFrameTicks[{Identity,Identity}]
}
}
]
}] You'll notice that the origins are different.

If you look at the output of plotting functions, you will sometimes see these internal functions:

Options[LogPlot[x, {x, 1, 10}], Ticks]


{Ticks -> {Automatic, ChartingScaledTicks[{Log, Exp}]}}

• Great, Thank you so much. I actually looked into FullForm of Graphics and found this Charting'ScaledTicks, But I didn't realize that it is already a tick mark function. But I found it is not the origin that can be different. For example, compare ChartingScaledTicks[{Identity, Identity}][-0.1, 3] and Plot[x, {x, -0.1, 3}, Frame -> True, FrameTicks -> {{ChartingScaledTicks[{Identity, Identity}], ChartingScaledFrameTicks[{Identity, Identity}]}, {ChartingScaledTicks[{Identity, Identity}], ChartingScaledFrameTicks[{Identity, Identity}]}}] Mar 14, 2018 at 14:58