0

How can I make these three graphs that are each other's consequence ? enter image description here

For the first and seconde I wrote:

\begin{tikzpicture}[baseline=(current bounding box.north)]
\begin{axis}[hide axis,width=0.4\textwidth,clip=false]
\addplot[samples=201,domain=-3.75:-3.25,blue] {-4*(x + 3.5)^(2) + 1.5};
\draw[draw=gray!30,latex-latex] (axis cs: -3.5, 1.55) node[below right] {$y$} -- (axis cs: -3.5, 1.25);
\draw[draw=gray!30,latex-latex] (axis cs: -3.85, 1.35) -- (axis cs: -3.15, 1.35) node[below right] {$x$};
\end{axis}
\end{tikzpicture}

For the third I wrote this code:

\begin{tikzpicture}
\begin{loglogaxis}[clickable coords code={%
    \pgfmathprintnumberto[verbatim,precision=1]%
        {\thisrow{error}}%
        \error%
    \pgfmathprintnumberto[verbatim,frac]%
        {\thisrow{frac}}%
        \fraccomp%
    \edef\pgfplotsretval{error \error, R=\fraccomp}%
}]%
\addplot table[x=dof,y=error] {
level  dof     error           frac      
1      4       2.50000000e-01  0.5        
2      16      6.25000000e-02  0.75      
3      64      1.56250000e-02  0.1        
4      256     3.90625000e-03  0.2         
5      1024    9.76562500e-04  0.5        
6      4096    2.44140625e-04  0.8        
7      16384   6.10351562e-05  0.125        
8      65536   1.52587891e-05  0.725
9      262144  3.81469727e-06  0.625
10     1048576 9.53674316e-07  1
};

\end{loglogaxis}
\end{tikzpicture} 
Torbjørn T.
  • 206,688
  • -1: What have you tried? As of now, you have asked three "do-it-for-me"-type of questions about graphs in the last couple of days. Have you put any effort into trying before asking these questions? – sodd Mar 14 '16 at 17:39
  • @hooy I try but i don't have very familiar with LaTeX. That's why I ask –  Mar 14 '16 at 17:58
  • Can you please upload what you have so far then? – sodd Mar 14 '16 at 17:58
  • 2
    Your code is 100 % (!) copy-paste from this answer by Harish Kumar and page 394 in the pgfplots manual. – sodd Mar 14 '16 at 18:15
  • I 've looked at those answers and I tried to change them without success . If I had succeeded I would not have asked the question , but since as I told you before, I'm not very familiar with LaTeX I asked the question @hooy –  Mar 14 '16 at 18:20
  • @hooy if you are going to downvote then you have to download all of these doitforme questions which is not useful anyway – percusse Mar 14 '16 at 20:07

0 Answers0