# How to remove ticks from the top and right axes of a plot generated with PGFPlots?

I want to remove ticks from the top and right axes of the bounding box of a plot generated with pgfplots. Any help appreciated.

Here is sample code which generates unwanted ticks.

\documentclass{article}
\usepackage{pgfplots,siunitx}
\pgfplotsset{compat=1.8}

celc fahr
0  32
20 68
40 104
60 140
80 176
100 212
}\mytable

\begin{document}
\begin{tikzpicture}
\begin{axis}[xlabel={\si{\degreeCelsius}},
ylabel={\si{\degree F}}]
\end{axis}
\end{tikzpicture}
\end{document}


The result, with unwanted ticks in top and right:

I realize this sounds very basic but a search for examples to guide me has not panned out.

• Search also the manual with axis lines. – percusse Jul 24 '13 at 15:08
• @Jake I do mean remove from top and right. I tried tick pos=right but this turns off ticks on the left y line AND the bottom line and sets the tick label on the top x axis. – Buck Thorn Jul 24 '13 at 15:13
• @Jake: to clarify, the plot shown above places the y label and y tick labels on the left side which is also not what I want but was readily fixed with y dir = reverse. – Buck Thorn Jul 24 '13 at 15:22
• @Jake: Thanks for your help, I made the edits you recommended. Sorry also about the confusion, the example shown is a watered down version of what I want to do. And no, I did not use y dir = reverse, instead I used yticklabel pos=right, I mixed those up in my answer. – Buck Thorn Jul 24 '13 at 15:30

You can use the xtick pos, ytick pos keys:

\documentclass{article}
\usepackage{pgfplots,siunitx}
\pgfplotsset{compat=1.8}

celc fahr
0  32
20 68
40 104
60 140
80 176
100 212
}\mytable

\begin{document}
\begin{tikzpicture}
\begin{axis}[xlabel={\si{\degreeCelsius}},
ylabel={\si{\degree F}},
xtick pos=left,
ytick pos=left]

• ... or tick pos=left, which sets xtick pos=left and ytick pos=left simultaneously. – Jake Jul 24 '13 at 15:20