Courbe d'une fonction périodique paire - clip
📅 April 17, 2024 | 👁️ Views: 4

\documentclass{standalone}
\standaloneconfig{margin=2mm 2mm 2mm 2mm}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}[scale=1.00]
\begin{axis}[axis lines=center,
xlabel={$x$},
ylabel={$y$},
xtick=\empty,ytick=\empty,
xmin=-2.5,xmax=2.5,
ymin=-0.1,ymax=1,
samples=200]
\begin{scope}
\clip (-2.2,-0.1) rectangle (2.2,1); % Define clipping path
\draw[red, thick,looseness=0.4]
(-2.5,1) to[out=0,in=180] (-2,0)
to[out=0,in=180] (-1,0.60)
to[out=0,in=180] (0,0)
to[out=0,in=180] (1,0.60)
to[out=0,in=180] (2,0)
to[out=0,in=180] (2.5,0.5); % Original curve path
\end{scope}
\node[below] at (2,0) {$e$};
\node[below] at (-2,0) {$-e$};
\node[below left] at (0,0) {\tiny O};
\end{axis}
\node[above] at (3.5,-0.5) {fonction périodique paire};
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\standaloneconfig{margin=2mm 2mm 2mm 2mm}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}[scale=1.00]
\begin{axis}[axis lines=center,
xlabel={$x$},
ylabel={$y$},
xtick=\empty,ytick=\empty,
xmin=-2.5,xmax=2.5,
ymin=-0.1,ymax=1,
samples=200]
\begin{scope}
\clip (-2.2,-0.1) rectangle (2.2,1); % Define clipping path
\draw[red, thick,looseness=0.4]
(-2.5,1) to[out=0,in=180] (-2,0)
to[out=0,in=180] (-1,0.60)
to[out=0,in=180] (0,0)
to[out=0,in=180] (1,0.60)
to[out=0,in=180] (2,0)
to[out=0,in=180] (2.5,0.5); % Original curve path
\end{scope}
\node[below] at (2,0) {$e$};
\node[below] at (-2,0) {$-e$};
\node[below left] at (0,0) {\tiny O};
\end{axis}
\node[above] at (3.5,-0.5) {fonction périodique paire};
\end{tikzpicture}
\end{document}
Related Courses, Exams, and Exercises
Course PDF:
📥 Download Courbe d'une fonction périodique paire - clip (PDF)