# Specifying unlabeled FrameTicks in Plot

I am running Mathematica 7. Suppose that I plot $\sin(x)$ for $x = 0..10$ and frame the plot using Frame -> True:

Plot[Sin[x], {x, 0, 10}, PlotRange -> All, Frame -> True]


Now suppose that I would like the horizontal axis to have ticks every $0.5$ (which it does), but with the ticks labeled only every $1$. Is there a way to do this?

FrameTicks seemed to be a possibility, but when I used Range[0, 10, 1] in the bottom horizontal axis specification, I lost the (non-labeled) ticks at every $0.5$:

Plot[Sin[x], {x, 0, 10}, PlotRange -> All, Frame -> True,
FrameTicks -> {{Automatic, Automatic}, {Range[0, 10, 1], Automatic}}]


-
The CustomTicks package is the way to go, IMHO. – Guillochon Jan 14 '13 at 22:34
Does FrameTicks -> {{Automatic, Automatic}, {Join[Range[0, 10], Thread[{Range[0.5, 10, 1.], " "}]], Automatic}}] work? – kglr Jan 14 '13 at 22:37
With the documentation for Frameticks or the results of this search mathematica.stackexchange.com/search?q=frameticks you should have no trouble. – DavidC Jan 14 '13 at 22:37
@kguler Yes, that indeed does work. Thank you! – Andrew Jan 14 '13 at 22:46
Here's an example of using CustomTicks. I think you'd end up rewriting the same thing anyway. It saves times to just use CustomTicks and you'll get a prettier output with less work. – Szabolcs Jan 14 '13 at 23:30

Plot[Sin[x], {x, 0, 10}, PlotRange -> All, Frame -> True,

you can control the labels,positions and styling of ticks more finely using the second, third and fourth arguments. Try, for example, Frameticks-> {{Automatic, Automatic}, {Join[{#, #, {.01, 0}} & /@ Range[0, 10], {#, " ", {.0075, 0}, Directive[Red, Thick]} & /@ Range[0.5, 10, 1.]], Automatic}}. (+1) – kglr Jan 14 '13 at 22:56