this is the first time I am trying to use Tikz in LaTeX and I have to admit that the huge amount of stuff you can do with Tikz is overwhelming and I would be thankful for a slow and detailed explanation.
What I have tried so far is to follow this post. But there are still things I want to do but are not mentioned there. This includes
- drawing a graph which is described by a function (e.g. a polynomial) and drawing vertical lines that intersect with them,
- drawing a coordinate systems with different grid sizes,
- labeling the coordinates (instead of numbers only),
- marking points on a graph,
- using braces at a certain position.
You can find the result I desire in the picture (sorry for the bad quality):
Could you please help me with this problem? I really tried to do it by myself by following the post above but there are so many things to consider and I have no idea where to start at all.
Thanks a lot!
Edit: So what I have tried to do so far is copying another code and try to understand what these functions to. This one has some stuff that could be useful for my drawing:
\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{arrows,intersections}
\begin{document}
\begin{tikzpicture}[
thick,
>=stealth',
dot/.style = {
draw,
fill = white,
circle,
inner sep = 0pt,
minimum size = 4pt
}
]
\coordinate (O) at (0,0);
\draw[->] (-0.3,0) -- (8,0) coordinate (xmax);
\draw[->] (0,-0.3) -- (0,5) coordinate (ymax);
\path[name path=x] (0.4,0.5) -- (6.7,4.7);
\path[name path=y] plot[smooth] coordinates {(-0.3,2) (2,1.5) (4,2.8) (6,5)};
\scope[name intersections = {of = x and y, name = i}]
\fill[gray!20] (i-1) -- (i-2 |- i-1) -- (i-2) -- cycle;
\draw (0.3,0.5) -- (6.7,4.7) node[pos=0.8, below right] {I don't even know where this belongs};
\draw[blue] plot[smooth] coordinates {(1,2) (2,3) (4,2.5) (6,3.5)};
\draw (i-1) node[dot, label = {above:$P$}] (i-1) {} -- node[left]
{$f(x_0)$} (i-1 |- O) node[dot, label = {below:$x_0$}] {};
\path (i-2) node[dot, label = {above:$Q$}] (i-2) {} -- (i-2 |- i-1)
node[dot] (i-12) {};
\draw (i-12) -- (i-12 |- O) node[dot,
label = {below:$x_0 + \varepsilon$}] {};
\draw[blue, <->] (i-2) -- node[right] {$f(x_0 + \varepsilon) - f(x_0)$}
(i-12);
\draw[blue, <->] (i-1) -- node[below] {$\varepsilon$} (i-12);
\path (i-1 |- O) -- node[below] {$\varepsilon$} (i-2 |- O);
\draw[gray] (i-2) -- (i-2 -| xmax);
\draw[gray, <->] ([xshift = -0.5cm]i-2 -| xmax) -- node[fill = white]
{$f(x_0 + \varepsilon)$} ([xshift = -0.5cm]xmax);
\endscope
\end{tikzpicture}
\end{document}
As I have understood one can draw polynomials by interpolation. And the result so far looks like this:

