Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

To remove the ticks of a figure (and not the tick labels), I could only find the opacity trick, that I find odd. Is there any better way?

\documentclass[12pt]{book}
\usepackage{tikz,pgfplots}
\begin{document}
\begin{tikzpicture}
\pgfplotsset{minor grid style={color=black!20,line width=0.25pt},major grid style={color=black!30,line width=0.35pt},tick style={opacity=0}}
\begin{semilogyaxis}[grid=both,scale only axis,width=7cm,height=5cm,xmin=0,xmax=2.4,ymin=1e-008,ymax=0.01,,axis background/.style={fill=black!3},xlabel=$\omega$,ylabel=$|X_5(\omega)|$,xtick={0,0.4,0.8,1.2,1.6,2,2.4},xticklabels={$0$,$$,$50$,$$,$100$,$$,$150$},ytickten={-8,-7,-6,-5,-4,-3,-2},yticklabels={$10^{-8}$,$$,$10^{-6}$,$$,$10^{-4}$,$$,$10^{-2}$}]
\addplot[color=blue,solid]
coordinates{(0,6.09811e-005)(2.4,6.10675e-003)};
\end{semilogyaxis}
\end{tikzpicture}
\end{document}
share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

You could also use tick style={draw=none}. This has the added flexibility in that you could change the color of the ticks with something like tick style={draw=red}

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.