I'm trying to customize a bit the axis lines extension of pgfplots. Here is my code and what I get now.

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{%
compat = 1.7,
every non boxed x axis/.style = {%
enlarge x limits = true,
x axis line style = {-stealth}
},
every non boxed y axis/.style = {%
enlarge y limits = true,
y axis line style = {-stealth}
},
axis x line = middle,
axis y line = middle,
every axis x label/.style = {%
at = {(xticklabel cs:1)},
anchor = north},
every axis y label/.style = {%
at = {(yticklabel cs:1)},
anchor=east}
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[xlabel = $x$,
ylabel = $\sin x$]
\addplot+[domain=-10:.5,samples=40] {sin(deg(x))+2};
\end{axis}
\end{tikzpicture}
\end{document}
I'd like to do four things automatically and I'm struggling with the doc...
- Both axis must intersect at
(0,0)whatever the function ploted is. - The
xlabelmust be below thexaxisat its end and theylabelat left of theyaxisat its end (similar to the ticklabels). - I want the
ticklabel0to appear below left(0,0)once (say only as axticklabel). - Whatever the function ploted is, I'd like the axis to intersect at
(0,0)and go at least a bit in the four directions (up, down, left and right, like a+). In the example above, I only get a_|_).
