I need to make the following graph.
And I carry the following, with the following code,
\begin{center}
\begin{tikzpicture}[scale=.9]
\draw[<->] (-1,0) -- (2*pi,0) node[below] {$x$};
\draw[thick] (4,0)--(4,1/2);
\draw[thick] (4,0)--(4,-1/2);
\draw[thick] (1.3,1/2)--(1.3,-1/2);
\draw[thick] (2.6,1/2)--(2.6,-1/2);
\draw (0,-1/6) node[left] {};
\draw[<->] (0,-1) -- (0, 3) node[left] {$y$};
\draw[-,domain = 0:4,thick]
plot (\x,{1/2}) node[right] {};
\draw[-,domain = 0:4,thick]
plot (\x,{-1/2}) node[right] {};
\end{tikzpicture}
\end{center}
I would need to fill in the table and put the labels. Someone could help me on that, thanks.
Best Answer
You can put the labels with
\node
s the same way as you did in the axes. For the filling the TikZ librarypatterns
could be helpful. And finally, you can draw the brace with the librarydecorations.pathreplacing
.I changed your original scale, otherwise the text will be very big, in my opinion. You can revert that or change the text size if you want.
The code: