# pgfplots yticklabels wont work

I have this code:

\begin{tikzpicture}[declare function={unipdf(\x,\xl,\xu)= (\x>\xl)*(\x<\xu)*1/(\xu-\xl);}]
\begin{axis}[
samples=100,
const plot mark mid,
scaled ticks = false,
ymin=0,ymax=0.5,
xmin=-3,xmax=3,
xtick={-2,2},
xticklabels={-$\frac{LSB}{2}$,$\frac{LSB}{2}$}],
ytick={0.25},
yticklabels={$\frac{1}{LSB}$}]
\addplot [very thick, orange] {unipdf(x,-2,2)};
\end{axis}
\end{tikzpicture}


Now this works all fine except that the y-label is not positioned correctly (always at 0) and that there is several other y-ticks:

Is there a particular reason for this behavior or is it just a bug?

I use the following packages:

\documentclass[10pt,landscape]{article}
\usepackage{multicol}
\usepackage{calc}
\usepackage{ifthen}
\usepackage[landscape]{geometry}
\usepackage{hyperref}

\usepackage{tikz}
\usepackage{amsmath}
\usetikzlibrary{arrows}
\usepackage{float}
\usetikzlibrary{shapes}
\usetikzlibrary{intersections}
\usepackage{circuitikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.13}
\usepackage{graphicx}

• You have an extra ] after the xticklabels, so the options regarding the yticks are not considered. – Torbjørn T. Feb 22 '17 at 20:16
• ohwow thank you very much! It didn't complain about the syntax so I would have never thought that there could be a syntax related issue :S – Yatekii Feb 22 '17 at 20:26