# How to specify frame tick labels without modifying the Automatic tick marks? [duplicate]

I have the following:

Graphics[
{
EdgeForm[Opacity[0.5]],
Opacity[0.75],
ColorData[24, 6],
Disk[{1, 0.5}, {1, 0.5}]
},
Frame -> True,
]


I want to change the tick labels so that they occur only at whole-number values, and have no fractional part (i.e. 0, 1, 2,... rather than 0.0, 1.0, 2.0).

I want to keep everything else, including the tick marks, exactly as it is now.

Is there a way to do this that does not require me to build the unlabeled tick marks1 from scratch?

1 The "unlabeled tick marks" would be: 1) all the minor ticks; 2) all the major ticks on the top and right edges of the frame; 3) the major ticks at (-0.5, 0.5) on the left edge, and at (0.5, -0.5) and (1.5, -0.5) on the bottom edge.

## marked as duplicate by Michael E2, MarcoB, m_goldberg, Bob Hanlon, Mr.Wizard♦Jul 2 '15 at 11:53

• The way to do it without rebuilding the ticks from scratch would be to use AbsoluteOptions or FullGraphics, but those functions have never worked properly and have become more broken with each new version of Mathematica. – Simon Rochester Jun 29 '15 at 5:10
• Related: (6043), (6851), (19123), (76228), (85339), (87095). The bug that makes this more difficult: (68937) – Mr.Wizard Jul 1 '15 at 14:38

Will this work for you?

fticks[min_, max_] :=
Table[If[FractionalPart[i] == 0., {i, Round@i, 0.02}, {i, ""}], {i,
Floor[min], Ceiling[max], 0.1}]

Graphics[{EdgeForm[Opacity[0.5]], Opacity[0.75], ColorData[24, 6],
Disk[{1, 0.5}, {1, 0.5}]}, Frame -> True, PlotRangePadding -> 0.5,
FrameTicks -> {{Automatic, Automatic}, {fticks, Automatic}}]


I do not know how to do it without calling custom function to build the tick labels.