
The above tikzpictureplot was created mainly adapting the code of Create xkcd style diagram in TeX . I located the dots and labels by trial and error. What are the better options? To create the entire plot should I use draw commands instead?
Because I noticed that xtick={},ytick={} did not remove the axes tick marks, I put two marks only in each axis, hiding them by points O, S and R. Is there another better method?
As you can see the blue curve y=f(x) is not totally smooth as it should be. I thought that might be due to inaccuracies when evaluating the square root of small numbers. Can one overcome this issue?
Here is the code I used:
\documentclass{standalone}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{pgfplots}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\pgfplotsset{every axis/.append style={line width=0.9pt}}
\begin{axis}[
axis x line=middle,
axis y line=middle,
ymax=2.2, ylabel=$y$,
xlabel=$x$,
xtick={0,3},
ytick={0,2},
xticklabels={},
yticklabels={}
]
\addplot[domain=0:3, blue, thick] {sqrt(x^3/27)-sqrt(3*x)+2};
\addplot[domain=0:1.5, red, thick] {-(x/4+7/8)*sqrt(2)+2};
\addplot[domain=0:3.2, black, thin] {0};
\end{axis}
\node at (-0.25,-0.25) {$O$};
\node at (3.4,0.9) {$P(x,y)$};
\node at (-0.7,2) {$Q(0,ut)$};
\node at (-0.7,5.1) {$R(0,uT)$};
\node at (6.7,-0.3) {$S(L,0)$};
\node at (2.4,1.8) {$y=f(x)$};
\node at (4.8,0.4) {$s=vt$};
\fill(0,0) circle (2pt);
\fill[blue](0,5.15) circle (2pt);
\fill[blue](3.2,0.6) circle (2pt);
\fill(0,2) circle (2pt);
\fill[blue] (6.4,0) circle (2pt);
\end{tikzpicture}
\end{document}
EDIT: To add dots at the origin and Q I added to percusse's code
\addplot [only marks,mark=*] coordinates { (0,0) (0,0.76) };
\node[below left] at (axis cs:0,0) {$O$};
before \end{axis}. The last line should type the origin, as commented by percusse, but for some reason unknown to me it doesn't work. The initial code of mine \node at (-0.25,-0.25) {$O$}; after \end{axis} does type O.

clip=false,option to the axis. Or you can letpgfplotsknow that you are going to do some more stuff via\pgfplotsset{after end axis/.code={\node[below left] at (axis cs:0,0) {$O$};}}just before the\end{axis}– percusse Nov 28 '12 at 22:37after end axis/.code={\node[below left] at (axis cs:0,0) {$O$};}to the axis environment. – percusse Nov 28 '12 at 22:40\pgfplotsset{after end axis/.code={\node[below left] at (axis cs:0,0) {$O$};}}. – Américo Tavares Nov 28 '12 at 22:59