Représentation graphique
Bonjour
J'arrive pas à obtenir ces figures, quelqu'un peut me signaler l'erreur (et comment ajouter les flèches avec les commentaires).
J'arrive pas à obtenir ces figures, quelqu'un peut me signaler l'erreur (et comment ajouter les flèches avec les commentaires).
\begin{figure}[H]\label{Chap1.Fig.1} \begin{tikzpicture} \draw [->] (-4,0) -- (4,0) node [below left] {\(s\)} ; \draw [->] (0,-1.7) -- (0,2.3) node [below left] {\(\Theta_{k}(s)\)} ; \draw[line width = 2pt] (0,0) arc (0:45:1.8); \draw [line width = 2pt] (1.8,1) -- (3.8,2) ; \draw [dashed] (1.8,0) node [below] {\(k\)} -- (1.8,1)-- (0,1) node [left] {\(k\)} ; \end{tikzpicture} \caption{The function $\Theta_{k}(s)$} \end{figure} \begin{figure}[H]\label{Chap1.Fig.2} \begin{tikzpicture} \draw [->] (-4,0) -- (5,0) node [below left] {\(s\)} ; \draw [->] (0,-1.7) -- (0,2.3) node [below left] {\(h_{n}(s)\)} ; \draw [line width = 2pt] (0,1) -- (1.8,1) -- (2.8,0) node [below] {\(n+1\)}-- (4.8,0) ; \draw [dashed] (1.8,0) node [below] {\(n\)} -- (1.8,1)-- (0,1) node [left] {\(1\)} ; \end{tikzpicture} \caption{The function $h_{n}(s)$} \end{figure} \begin{figure}[H]\label{Chap1.Fig.3} \begin{tikzpicture} \draw [->] (-4,0) -- (5,0) node [below left] {\(s\)} ; \draw [->] (0,-1.7) -- (0,2.3) node [below left] {\(S_{n}(s)\)} ; \draw [line width = 2pt] (0,0) -- (1.8,1) -- (2.8,2) -- (4.8,2) ; \draw [dashed] (1.8,0) node [below] {\(n\)} -- (1.8,1)-- (0,1) ; \draw [dashed] (2.8,2) -- (2.8,0) node [below] {\(n+1\)} ; \end{tikzpicture} \caption{The function $S_{n}(s)$} \end{figure}
Réponses
-
\documentclass{article} \usepackage{tikz} \begin{document} \begin{figure}[h]\label{Chap1.Fig.1} \begin{tikzpicture} \draw [->] (-4,0) -- (4,0) node [below left] {\(s\)} ; \draw [->] (0,-1.7) -- (0,2.3) node [below left] {\(\Theta_{k}(s)\)} ; \draw[very thick] plot[domain=0:1.8](\x,\x*\x/3.24); \draw [very thick] (1.8,1) -- (3.8,2) ; \draw [dashed] (1.8,0) node [below] {\(k\)} -- (1.8,1)-- (0,1) node[left] {\(ak^2\)} ; \end{tikzpicture} \caption{The function $\Theta_{k}(s)$} \end{figure} \begin{figure}[h]\label{Chap1.Fig.2} \begin{tikzpicture} \draw [->] (-4,0) -- (5,0) node [below left] {\(s\)} ; \draw [->] (0,-1.7) -- (0,2.3) node [below left] {\(h_{n}(s)\)} ; \draw [very thick] (0,1) -- (1.8,1) -- (2.8,0) node [below] {\(n+1\)}-- (4.8,0) ; \draw [dashed] (1.8,0) node [below] {\(n\)} -- (1.8,1) -- (0,1) node[left] {\(1\)} ; \end{tikzpicture} \caption{The function $h_{n}(s)$} \end{figure} \begin{figure}[h]\label{Chap1.Fig.3} \begin{tikzpicture} \draw [->] (-4,0) -- (5,0) node [below left] {\(s\)} ; \draw [->] (0,-1.7) -- (0,2.3) node [below left] {\(S_{n}(s)\)} ; \draw [very thick] (0,0) -- (1.8,1) to[out=29.05,in=180] (2.8,2) -- (4.8,2) ; \draw [dashed] (1.8,0) node [below] {\(n\)} -- (1.8,1)-- (0,1) ; \draw [dashed] (2.8,2) -- (2.8,0) node [below] {\(n+1\)} ; \draw [gray,thin,->,>=latex] (3.8,1.) node[below]{\small constant}--(3.8,2); \draw [gray,thin,->,>=latex] (.9,1.2) node[above]{\small linear}--(.9,.5); \draw [gray,thin,->,>=latex] (1.5,1.92) node[left]{\small smooth}--(2.1,1.35); \end{tikzpicture} \caption{The function $S_{n}(s)$} \end{figure} \end{document}
-
Voici une proposition pour la partie avec hachures de la dernière figure.
\documentclass{article} \usepackage{tikz} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} \fill[pattern=vertical lines] (0,0) to[out=28, in=180] (3,1) to[out=0,in=-130] (4,1.5)--(4,2) to[out=38,in=224] (4.5,2.5) to[out=224-180,in=202] (6,3.3) -- (0,3.3)--cycle; \draw[thick] (0,0) to[out=28, in=180] (3,1) to[out=0,in=-130] (4,1.5); \draw[thick,dashed] (4,1.5)--(4,2); \draw[thick] (4,2) to[out=38,in=224] (4.5,2.5) to[out=224-180,in=202] (6,3.3) to[out=22,in=240] (7.2,4.1); \fill[pattern=north east lines] (0,0) to[out=28, in=180] (3,1) to[out=0,in=-130] (4,1.5) to[dashed] (4,2) to[out=38,in=224] (4.5,2.5) -- (4.5,0)--cycle; \end{tikzpicture} \end{document}
-
Bonjour
Voici le code, après j'ai besoin de quelques correction :
- dans la première figure à gauche, il y a une petite partie qui n'est pas hachuré.
- $A(t)$ est incorrecte dans figure droite et le point est collé au graphe.
Merci beaucoup.\begin{figure} \begin{minipage}[c]{.46\linewidth} \begin{tikzpicture} \draw [->] (-1,0) -- (7.5,0) node [below left] {\(\tau\)} ; \draw [->] (0,-1) -- (0,5) node [below left] {\(\sigma\)} ; \draw[line width = 2pt] (0,0)node [below right] {\(0\)} to[out=28, in=180] (1.4,0.7); \draw[line width = 2pt] (4.5,2.5) to[out=224-180,in=202] (6,3.3) to[out=22,in=240] (7.2,4.1); \fill[pattern=north west lines] (0,0) to[out=28, in=180] (1.4,0.7) to (3.7,0.7) to (3.7,2.5) to (4.5,2.5) to[out=38,in=224] (5.5,3.1) -- (5.5,0)--cycle; \draw [dashed] (5.5,0) node [below] {\(t\)} -- (5.5,3.1)node [ above left] {\(\sigma=a(\tau)\)}; \draw[dashed] (3.7,2.5)--(3.7,0.7); \draw [line width = 2pt] (1.4,0.7) --(3.7,0.7) ; \draw [line width = 2pt] (3.7,2.5) --(4.5,2.5) ; \draw [gray,thin,->,>=latex] (6,0.7) node[ right] {\small $s=A(t)$}--(5,0.7); \end{tikzpicture} \end{minipage} \hfill \begin{minipage}[c]{.46\linewidth} \begin{tikzpicture} \draw [->] (-1,0) -- (7,0) node [below left] {\(t\)} ; \draw [->] (0,-1) -- (0,5) node [below left] {\(s\)} ; \draw[line width = 2pt] (0,0) node [below right]{\(0\)} -- (2.5,0.9)node[ right] {\small $s=A(t)$} ; \draw [line width = 2pt] (2.5,0.9)to[out=22,in=240] (4.2,3) ; \end{tikzpicture} \end{minipage} \caption{The functions $a(\tau)$ and $A(t)$} \end{figure} \begin{figure} \begin{tikzpicture} \draw [->] (-1,0) -- (7.5,0) node [below left] {\(\tau\)} ; \draw [->] (0,-1) -- (0,5) node [below left] {\(\sigma\)} ; \fill[pattern=vertical lines] (0,0) to[out=28, in=180] (3,1) to[out=0,in=-130] (4,1.5)--(4,2) to[out=38,in=224] (4.5,2.5) to[out=224-180,in=202] (6,3.3) -- (0,3.3)--cycle; \draw[line width = 2pt] (0,0) to[out=28, in=180] (3,1) to[out=0,in=-130] (4,1.5); \draw[line width = 2pt,dashed] (4,1.5)--(4,2); \draw[line width = 2pt] (4,2) to[out=38,in=224] (4.5,2.5) to[out=224-180,in=202] (6,3.3) to[out=22,in=240] (7.2,4.1); \fill[pattern=north east lines] (0,0) to[out=28, in=180] (3,1) to[out=0,in=-130] (4,1.5) to[dashed] (4,2) to[out=38,in=224] (4.5,2.5) -- (4.5,0)--cycle; \draw [dashed] (4.5,0) node [below] {\(t\)} -- (4.5,3.3)-- (0,3.3)node [left] {\(s\)}-- (6,3.3)node [ right] {\(\sigma=a(\tau)\)}node [ below right] {\(\tau=\tilde{a}(\sigma)\)}; \draw [dashed] (0,0) node [below right] {\(0\)}--(0,1.1)node [left] {\(\frac{A(t)}{t}\)} -- (4.5,1.1); \draw [gray,thin,->,>=latex] (1.5,4) node[above]{\small $s=\tilde{A}(t)$}--(2,2); \draw [gray,thin,->,>=latex] (6,0.7) node[ right]{\small $s=A(t)$}--(4,0.7); \end{tikzpicture} \caption{The functions $A(t)$ and $\tilde{A}(t)$} \end{figure}
[Résultat après compilation. AD]
-
Bonjour M.A.
Pour que les deux figures côte à côte ne se chevauchent pas, on peut diminuer la largeur des 'minipage' à 0.3 et diminuer l'axe des t négatif.
Alain -
Ça ne me paraît pas une bonne idée de mettre des minipages dans une figure, on ne contrôle pas le saut éventuel. Mieux vaut, je crois, faire un "scope" pour décaler la deuxième figure dans le même environnement tikzpicture.
Pour comprendre d'où vient la zone non hachurée, il suffit de remplacer le \fill par \draw[fill]. Il faut vraiment que la courbe qui définit le haut de la zone hachurée soit identique à la courbe tracée en gras.
Bref, voici une proposition.\documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{patterns} \begin{document} \begin{figure} \centering \begin{tikzpicture} \draw [->] (-.5,0) -- (7.5,0) node [below left] {\(\tau\)} ; \draw [->] (0,-.5) -- (0,5) node [below left] {\(\sigma\)} ; \draw[line width = 2pt] (0,0)node [below right] {\(0\)} to[out=28, in=180] (1.4,0.7) --(3.7,0.7) ; \draw [dash pattern=on 5pt off 3pt, line width = 2pt] (3.7,0.7)--(3.7,2.5); \draw [line width = 2pt] (3.7,2.5) --(4.5,2.5) ; \draw[line width=2pt] (4.5,2.5) to[out=44,in=202] (5.5,3.1) to[out=22,in=240] (7.2,4.1); \draw[fill,pattern=north west lines] (0,0) to[out=28, in=180] (1.4,0.7) -- (3.7,0.7) -- (3.7,2.5) -- (4.5,2.5) to[out=44,in=202] (5.5,3.1) -- (5.5,0)-- cycle; \draw [dash pattern=on 5pt off 3pt] (5.5,0) node [below] {\(t\)} -- (5.5,3.1)node [above left] {\(\sigma=a(\tau)\)}; \draw[dash pattern=on 5pt off 3pt] (3.7,2.5)--(3.7,0.7); \draw [gray,thin,->,>=latex] (6,0.7) node[ right] {\small $s=A(t)$}--(5,0.7); \begin{scope}[xshift=9cm,x=1.2cm,y=.1667cm] \draw [->] (-.5/1.2,0) -- (6/1.2,0) node [below left] {\(t\)} ; \draw [->] (0,-.5*6) -- (0,5*6) node [below left] {\(s\)} ; \draw[line width=2pt] (0,0)--(1.7,{exp(1.7)}); \draw[line width=2pt] plot[domain=1.7:3.3] (\x,{exp(\x)}); \node at(3,9.6) {\small $s=A(t)$} ; %\draw [line width = 2pt] (2.5,0.9)to[out=22,in=240] (4.2,3) ; \end{scope} \end{tikzpicture} \caption{The functions $a(\tau)$ and $A(t)$} \end{figure} \begin{figure} \begin{tikzpicture} \draw [->] (-.5,0) -- (7.5,0) node [below left] {\(\vphantom{0}\tau\)} ; \draw [->] (0,-.5) -- (0,5) node [below left] {\(\sigma\)} ; \fill[pattern=vertical lines] (0,0) to[out=28, in=180] (3,1) to[out=0,in=-130] (4,1.5)--(4,2) to[out=38,in=224] (4.5,2.5) to[out=224-180,in=202] (6,3.3) -- (0,3.3)--cycle; \draw[line width = 2pt] (0,0) to[out=28, in=180] (3,1) to[out=0,in=-130] (4,1.5); \draw[line width = 2pt,dash pattern=on 5pt off 3pt] (4,1.5)--(4,2); \draw[line width = 2pt] (4,2) to[out=38,in=224] (4.5,2.5) to[out=224-180,in=202] (6,3.3) to[out=22,in=240] (7.2,4.1); \fill[pattern=north west lines] (0,0) to[out=28, in=180] (3,1) to[out=0,in=-130] (4,1.5) to[dash pattern=on 5pt off 3pt] (4,2) to[out=38,in=224] (4.5,2.5) -- (4.5,0)--cycle; \draw [dash pattern=on 5pt off 3pt] (4.5,0) node [below] {\(\vphantom{0}t\)} -- (4.5,3.3) -- (0,3.3) node[left] {\(s\)}-- (6,3.3)node [below right] {\(\begin{array}{l}\sigma=a(\tau)\\\tau=\tilde{a}(\sigma)\end{array}\)}; \draw [dash pattern=on 5pt off 3pt] (0,0) node [below right] {\(0\)}--(0,1.1)node[left] {\(\dfrac{A(t)}{t}\)} -- (4.5,1.1); \draw [gray,thin,->,>=latex] (1.5,4) node[above]{\small $s=\tilde{A}(t)$}--(2,2); \draw [gray,thin,->,>=latex] (6,0.7) node[ right]{\small $s=A(t)$}--(4,0.7); \end{tikzpicture} \caption{The functions $A(t)$ and $\tilde{A}(t)$} \end{figure} \end{document}
-
Bonjour
Comment peut-on obtenir cette figure et ajouter des nodes ?
Merci\begin{figure}[H]\label{Figure 1} \begin{tikzpicture} \draw [->] (-5,0) -- (5,0) node [below left] {\(x\in \mathbb{R}^{n}\)} ; \draw [->] (0,-1) -- (0,5) node [below right] {\(y\)} ; \draw[line width=2pt] plot[smooth] coordinates { (-.5,0) (0,4.5) (.5,0)}; \draw[line width=2pt] plot[smooth] coordinates { (-1.5,0) (0,2.5) (1.5,0)}; \draw[line width=2pt] plot[smooth] coordinates { (-3,0) (0,1) (3,0)}; \end{tikzpicture} \caption { Friedrich's mollifiers $(\rho_{n})$} \end{figure}
-
Voici une proposition avec un nœud de chaque sorte.
\begin{tikzpicture} \draw [->] (-5,0) -- (5,0) node [below left] {\(x\in \mathbb{R}^{n}\)} ; \draw [->] (0,-1) -- (0,5) node [below right] {\(y\)} ; \draw[line width=2pt] plot (-3,0) to[out=0,in=180] (0,1) to[out=0,in=180] (3,0); \draw[line width=2pt] plot (-1.5,0) to[out=0,in=180, looseness=.5] (0,2) to[out=0,in=180, looseness=.5] (1.5,0); \draw[line width=2pt] plot (-.75,0) to[out=0, in=180, looseness=.25] (0,4) to[out=0,in=180, looseness=.25] (.75,0); \node[ right] at(.3,3) {$y=\rho_{\frac14}(x)$}; \node[below] at(3,0) {$|x|=1$}; \node[below left] at(0,0) {$0$}; \end{tikzpicture}
-
Oui, pourquoi pas ? J'attire ton attention sur deux points : TiKZ ne sait pas calculer les puissances, d'où le détour par l'exponentielle du logarithme ; il faut couper le graphe (\clip) pour ne pas déborder.
\begin{tikzpicture}[x=2cm] \draw [->,darkgray] (-3,0) -- (3,0) node [below left] {\(x\)} ; \draw [->,darkgray] (0,-5) -- (0,5) node [below right] {\(y\)} ; \foreach \i in {-2,...,2} { \draw[darkgray] (\i,-3pt)--(\i,3pt); } \foreach \i in {-4,...,4} { \draw[darkgray] (-3pt,\i)--(3pt,\i); } \clip (-3,-5) rectangle (3,5); \foreach \p in {2,4,6} { \draw[thick] plot[domain=-3:3,samples=200] (\x,{\p*exp((\p-2)*ln(abs(\x)))*\x}); } \end{tikzpicture}
-
Bonjour
Comment peut-on aligner le texte avec le graphe\begin{figure}[H] \centering \begin{tikzpicture}[x=0.85cm, y=0.85cm] \draw [->] (-5,0) -- (5,0) node [below left] {\(s\)} ; \draw [->] (0,-1) -- (0,2.3) node [below left] {\(\Theta_{h}(s)\)} ; \draw [line width = 2pt] (-4.8,1)-- (-2.8,1) -- (-1.8,0) node[below] {\(-(h-1)\)}-- (1.8,0) node [below] {\(h-1\)} -- (2.8,1) -- (4.8,1) ; \draw [dashed] (-2.8,0) node [below] {\(-h\)} --(-2.8,1) --(0,1) node [above left] {\(1\)} -- (2.8,1)-- (2.8,0) node [below] {\(h\)} ; \draw [gray,thin,->,>=latex] (0.9,-.5) node[below]{\small zero}--(0.9,0); \draw [gray,thin,->,>=latex] (3.8,1.7) node[above]{\small constant}--(3.8,1.2); \draw [gray,thin,->,>=latex] (1.3,1.5) node[above]{\small linear}--(2,.5); \begin{scope}[xshift=3cm,x=0.785 cm,y=0.85cm] $\Theta_{h}(s)=\begin{cases} 1&\text{ if }|s|\geq h,\\ 0&\text{ if }|s|<h-1,\\ \text{affine }&\text{ otherwise}, \end{cases}$ %\draw [line width = 2pt] (2.5,0.9)to[out=22,in=240] (4.2,3) ; \end{scope} \end{tikzpicture} \caption{The function $\Theta_{h}(s)$}\label{Fig2} \end{figure}
Merci Bien -
Bonjour M.A
Dans la ligne\begin{scope}[xshift=3cm,x=0.785 cm,y=0.85cm]
essaie xshift=7cm, ou plus ou moins selon tes goûts.
Alain -
Il y a quand même un problème : dans une figure TiKZ, on ne peut pas mettre un tableau comme ça. Il faut l'inclure dans un \node dont on précise les coordonnées. Voici une façon de faire :
\begin{scope}[xshift=7.5cm,x=0.785 cm,y=0.85cm] \node at(0,0) {$\Theta_{h}(s)=\begin{cases} 1&\text{ if }|s|\geq h,\\ 0&\text{ if }|s|<h-1,\\ \text{affine }&\text{ otherwise}, \end{cases}$}; %\draw [line width = 2pt] (2.5,0.9)to[out=22,in=240] (4.2,3) ; \end{scope}
Sinon, pour décider uniquement de la position du bord gauche de la formule, une façon est de faire un \node[ right] sans scope :\begin{tikzpicture}[x=0.85cm, y=0.85cm] \draw [->] (-5,0) -- (5,0) node [below left] {\(s\)} ; \draw [->] (0,-1) -- (0,2.3) node [below left] {\(\Theta_{h}(s)\)} ; \draw [line width = 2pt] (-4.8,1)-- (-2.8,1) -- (-1.8,0) node[below] {\(-(h-1)\)}-- (1.8,0) node [below] {\(h-1\)} -- (2.8,1) -- (4.8,1) ; \draw [dashed] (-2.8,0) node [below] {\(-h\)} --(-2.8,1) --(0,1) node [above left] {\(1\)} -- (2.8,1)-- (2.8,0) node [below] {\(h\)} ; \draw [gray,thin,->,>=latex] (0.9,-.5) node[below]{\small zero}--(0.9,0); \draw [gray,thin,->,>=latex] (3.8,1.7) node[above]{\small constant}--(3.8,1.2); \draw [gray,thin,->,>=latex] (1.3,1.5) node[above]{\small linear}--(2,.5); \node[ right] at(5.5,0) {$\Theta_{h}(s)=\begin{cases} 1&\text{ if }|s|\geq h,\\ 0&\text{ if }|s|<h-1,\\ \text{affine }&\text{ otherwise}, \end{cases}$}; %\draw [line width = 2pt] (2.5,0.9)to[out=22,in=240] (4.2,3) ; \end{tikzpicture}
-
Bonjour
Dans ce cas là, peut-on numéroter la formule parce que avec \begin{equation} ça marche pas ?
Merci -
En effet, l'environnement equation pose problème. Je pense que c'est parce qu'il implique de passer en mode "horizontal" (commencer par aller à la ligne, etc.). Il suffit de l'encapsuler dans une minipage :
\node[ right] at(5.5,0) {\begin{minipage}{6cm}\begin{equation}\Theta_{h}(s)=\begin{cases} 1&\text{ if }|s|\geq h,\\ 0&\text{ if }|s|<h-1,\\ \text{affine }&\text{ otherwise}, \end{cases}\end{equation}\end{minipage}};
-
\begin{tikzpicture}[x=1.5cm,y=1.5cm] \draw[thick] plot[domain=-190:20] ({cos(\x)},{1.5*sin(\x)-.25*cos(1.4*\x)}); \draw[<-,>=latex] (0,{-1.5-.25*cos(1.4*90)})--++(-.3,.4)--++(.45,.35)--++(-.27,.18)--++(.1,.21)--++(-.13,.15); \node at(0,.4){$D$}; \node at(-.85,-1.) {$\partial D$}; \begin{scope}[xshift=4cm] \draw[thick] plot[domain=-190:20] ({cos(\x)},{1.5*sin(\x)-.25*cos(1.4*\x)}); \draw (0,{-1.5-.25*cos(1.4*90)})--++(-.3,.4)--++(.45,.35)--++(-.27,.18)--++(.1,.21)--++(-.13,.15); \draw[->,>=latex] (0,{-1.5-.25*cos(1.4*90)})--++(.2,.33)--++(.4,.17)--++(.14,.37)--++(-.16,.27); \node at(0,.4){$D$}; \node at(-.85,-1.) {$\partial D$}; \end{scope} \end{tikzpicture}
[Résultat après compilation $\LaTeX$ :-) AD] -
Pas bien dur, qu'est-ce qui t'arrête ?
\begin{tikzpicture}[x=1.5cm,y=1.5cm] \draw[thick] plot[domain=-100:40,samples=100] ({2.5*cos(\x)},{1*sin(\x)+.15*cos(2.2*\x)}); \foreach \x/\i in {-52/j,-70/i} { \draw[thick,dotted] ({2.5*cos(\x)},{1*sin(\x)+.15*cos(2.2*\x)}) circle(.5); \draw ({2.5*cos(\x)},{1*sin(\x)+.15*cos(2.2*\x)})++(-.37,.6) node {$U_\i$}; \draw ({2.5*cos(\x)},{1*sin(\x)+.15*cos(2.2*\x)})++(-.1,.2) node {$\varphi_\i$}; } \end{tikzpicture}
[Résultat après compilation $\LaTeX$ :-) AD] -
Bonjour, SVP, Comment peut-on ajouter la flèche entre les deux schéma ?
\begin{figure}[H] \centering \begin{tikzpicture}[x=0.85cm, y=0.85cm] \draw [->] (-4,0) -- (4,0) node [below left] {\(x\)} ; \draw [->] (0,-1) -- (0,3); \draw [line width = 2pt,->,>=latex] (0,0) node [below left] {\(0\)}--(0,2) node[left]{\small Dirac measure}node [ right] {\(\delta(x)\)} ; \node[below left] at(-3.5,2.5) {\fbox{t=0}}; \begin{scope}[xshift=7.5cm,x=0.85 cm,y=0.85cm] \draw [->] (-4,0) -- (4,0) node [below left] {\(x\)} ; \draw [->] (0,-1) -- (0,3); \draw [line width = 2pt] (-3.8,1) to[out=0,in=180] (0,2.5) to[out=0,in=180](3.8,1); \node[below right] at(2.5,2) {$K_{i}(x)$}; \node[below left] at(0,0) {0}; \node[below right] at(-3.5,2.5) {\fbox{t>0}}; %\draw [line width = 2pt] (2.5,0.9)to[out=22,in=240] (4.2,3) ; \end{scope} \end{tikzpicture} \caption{The intuitive meaning of the heat Kernel $K_{i}(x)$ of Dirac mass $\delta(x)$} \end{figure}
Merci bien
-
Bonjour A.B
Essaye de mettre cette ligne après \end{scope} et avant \end{tikzpicture}\draw [->] (3.5,0.8) -- (5,0.8) node [midway,above]{After $t$};
Alain -
Bonjour , j'aurais besoin de cette figure (je pense que le code est incorrect)
\begin{figure}[H] \centering \begin{tikzpicture}[x=0.75cm, y=0.75cm] \draw [->] (-6,0) -- (6,0) node [below left] {\(x\)} ; \draw [->] (0,0) -- (0,5.5)node [above right] {\(u(x,y,T)\)}; \draw [->] (0,0) -- (4.8,4.8)node [below right] {\(y)\)}; \draw [gray,thin] (-5.8,0.2) to[out=0,in=180] (0,1) to[out=0,in=180](4.8,0.2); \draw [gray,thin] (-5.5,0.6) to[out=0,in=180] (0,2) to[out=0,in=180](5.3,0.9); \draw [gray,thin] (-5,1) to[out=0,in=180] (0,3) to[out=0,in=180](5.7,1.5); \draw [gray,thin] (-4.8,1.5) to[out=0,in=180] (0,4) to[out=0,in=180](6,2); \draw [gray,thin] (-4,3) to[out=0,in=180] (0,5) to[out=0,in=180](6.5,3.2); \node[below left] at(0,0) {0}; \end{tikzpicture} \caption{Example of solutions $u$ defined in $Q=(0,T)\times\mathbb{R}^{2}$ near the origin.} \end{figure}
Merci -
Voilà une proposition, je me suis amusé à calculer une fonction qui ressemble à la nappe représentée plutôt que mettre des draw et des to[in,out].
\begin{tikzpicture}[x=2.9cm,y=1.9cm] \draw [->,>=latex] (-2.2,0) -- (2.5,0) node [below left] {\(x\)} ; \draw [->,>=latex] (0,0) -- (0,2.2)node [above right] {\(u(x,y,T)\)}; \draw [->,>=latex] (0,0) -- (2.,2.)node [below right] {\(y\)}; \foreach \y in {1,...,8} { \draw plot[domain=-1.5:1.5] (\x+.196*\y*.5, {sin(57.3*.196*\y)/sqrt(.196*\y+.001)/(1-sin(57.3*\x*.196*\y)/7+\x*\x)+.196*\y*.7}); } \draw plot[domain=-1.5:1.5] (\x+.196*.3*.5, {sin(57.3*.196*.3)/sqrt(.196*.3+.001)/(1-sin(57.3*\x*.196*.3)/7+\x*\x)+.196*.3*.7}); \foreach \t in {-12,-10,...,12} { \draw plot[domain=0:1.57] (\t/8+\x*.5, {sin(57.3*\x)/sqrt(\x+.001)/(1-sin(57.3*\t/8*\x)/7+\t/8*\t/8)+\x*.7}); } \draw[very thick] plot[domain=0:1.57] (\x*.5, {sin(57.3*\x)/sqrt(\x+.001)+\x*.7}); \end{tikzpicture}
[Résultat après compilation $\LaTeX$. :-) AD] -
Bonjour
Svp, comment rajouter les ellipses dans le code ?\begin{figure}[H] \centering \begin{tikzpicture}[x=0.75cm, y=0.75cm] \draw [->] (-1,0) -- (6,0) node [below left] {\(x\)} ; \draw [->] (0,-1) -- (0,6)node [below left] {\(t\)}; \draw [line width = 2pt] (1.5,1)--(1.5,5); \draw [line width = 2pt] (4.5,1)--(4.5,5); \node[ right] at(1.5,3) {Q}; \node[ right] at(4.5,3) {$\Sigma$}; \node[below] at(3,0) {$\Omega$}; \end{tikzpicture} \caption{Geometric illustration of the parabolic domain.} \end{figure}
Merci -
En effet, ce sont bien des ellipses qu'il faut mettre et pas des trucs horribles avec un point anguleux de chaque côté. Eh bien, il n'y a qu'à paramétrer les ellipses.
\begin{tikzpicture}[x=0.75cm, y=0.75cm] \draw [->] (-1,0) -- (6,0) node [below left] {\(x\)} ; \draw [->] (0,-1) -- (0,6)node [below left] {\(t\)}; \draw [line width = 1.2pt] (1.5,1)--(1.5,5); \draw [line width = 1.2pt] (4.5,1)--(4.5,5); \node[ right] at(1.5,3) {$Q$}; \node[ right] at(4.5,3) {$\Sigma$}; \node[below] at(3,0) {$\Omega$}; \draw[line width=1.2pt] plot[domain=-180:0] ({3+1.5*cos(\x)},{1+.6*sin(\x)}); \draw[line width=1.2pt] plot[domain=-180:0] ({3+1.5*cos(\x)},{4+.6*sin(\x)}); \draw[line width=.8pt,dashed] plot[domain=-180:0] ({3+1.5*cos(\x)},{1-.6*sin(\x)}); \draw[line width=.8pt,dashed] plot[domain=-180:0] ({3+1.5*cos(\x)},{4-.6*sin(\x)}); \end{tikzpicture}
Résultat de la compilation $\LaTeX$. :-) AD] -
Bonjour
Merci pour l'aide\begin{figure}[H] \begin{tikzpicture}[x=0.75cm, y=0.75cm] \draw [->] (-3,0) -- (6,0) node [above left] {\(t\)} ; \draw [->] (0,-1) -- (0,6)node [below right] {\(\mathbb{R}^{N}\)}; \draw [dashed] (5,0)node [below]{\(t_{\star}\)}--(5,5.8); \node[left] at(0,2) {$x_{0}$}; \end{tikzpicture} \end{figure}
Amitiés -
Qu'est-ce qui te manque ici ? Des idées pour fabriquer une fonction qui ait cette allure ? Il suffit d'ajouter un polynôme du second degré qui s'annule en dehors du cadre – j'ai pris $-3$ et $5.5$ – et une fonction qui explose à l'abscisse prédéterminée $t_*=5$, par exemple $1/(x-5)^2$. En tâtonnant pour régler les coefficients, voilà ce que ça donne.
\begin{tikzpicture} \draw[->,>=latex] (-2,0) -- (6,0) node [above left] {$t$}; \draw[->,>=latex] (0,-1) -- (0,4)node [below right] {$\mathbf{R}^n$} ; \draw[dashed] (5,0)--(5,4); \draw (5,4pt)--(5,-4pt) node[below]{$t_*$}; \clip (-2,-1) rectangle(6,4); \draw[thick, blue] plot[domain=-2:4.8,samples=200] (\x,{(3+\x)*(5.5-\x)/18+.2/(\x-5)/(\x-5)}); \fill (0,.9247) circle(1.5pt) node[above left]{$x_0$}; \node[ left] at (4.7,2.5) {$x(t)$}; \end{tikzpicture}
-
Merci beaucoup pour toutes les corrections.
-
Bonjour,
comment faire ça s'il vous plaît.
Merci. -
Ne serait-il pas temps que tu te mettes à faire ces dessins toi-même ?
\begin{tikzpicture}[x=0.2cm,y=0.2cm] \draw[very thick] (0,0) rectangle(18,11); \foreach \i in {0,...,8} { \foreach \j in {0,...,5} { \fill (2*\i,2*\j) rectangle (2*\i+1,2*\j+1) ; } \foreach \j in {0,...,4} { \fill (2*\i+1,2*\j+1) rectangle (2*\i+2,2*\j+2) ; } } \draw[>=latex,->,dashed,line width=4pt] (19,5.5) -- (34,5.5) node[midway,above=5pt] {\Large homogenize}; \draw[very thick,fill=black!50] (35,0) rectangle (53,11); \end{tikzpicture}
-
Bonjour
Svp, comment puis-je relier " u" avec " g(u) " ? Merci.\[\begin{tikzcd}[column sep=pi*1cm,row sep=pi*1cm, execute at end picture={ \draw[<-,postaction={decorate,decoration={text along path,text align=center, raise=1ex, text={|\small|change of variable}}}] (\tikzcdmatrixname-2-1) to[bend left=15] (\tikzcdmatrixname-1-1); }] u \ar[r,"g(s)s\geq 0" ',"g:\mathbb{R}\to\mathbb{R}~C^{1}(\mathbb{R})\text{/}~g'(s)>0"] & & g(u) \ar[d,"G(s)=\int\limits_0^sg(r)\,\mathrm{d}r"] \\ w=\psi(u) & & G(u) \ar[ll, "\psi(t)=\int\limits_0^t\mathrm{e}^{-G(s)}\,\mathrm{d}s" ', "\psi^{-1}:\mathbb{R}\to\mathbb{R}~C^{2}(\mathbb{R})\text{/}~(\psi^{-1})'(s)>0"] \end{tikzcd}\]
-
Bonjour,
Une \ar[rr] fait probablement l'affaire, mais je ne peux vérifier car votre document ne compile pas tel quel. Voir à partir de la section Absolute placement of arrows dans le manuel de tikzcd ; il y a différentes méthodes, du genre to=2-2 (cf. /tikz/commutative diagrams/to), ou même en nommant un nœud pour y faire référence via 'son nom', 'son nom.north east', etc. -
Bonjour
Svp, comment puis-je positionner une figure de cette forme (le nom de la figure en haut à gauche et la figure à droite) comme dans le fichier joint.
Merci\begin{figure} \begin{tikzpicture}[x=0.7cm, y=0.7cm] \draw [->] (-4,0) -- (4,0) node [below left] {\(\)} ; \draw [->] (0,-1.7) -- (0,2.3) node [below left] {\(\)} ; \end{tikzpicture} \caption{The function }\label{Fig.1} \end{figure}
-
Bonjour,
Il serait préférable d'ouvrir un sujet dédié avec un titre correspondant à la question !
Si c'est juste pour une figure, on peut faire à la main : ne pas utiliser \caption et mettre à la place quelque chose comme :\refstepcounter{figure}\label{le-label}\figurename~\thefigure\quad Légende ici... \centering \begin{tikzpicture} ... \end{tikzpicture}
à l'intérieur de l'environnement figure. À l'inverse, si cela doit être automatisé pour toutes les figures, il est possible d'utiliser le package caption comme suit :\documentclass{article} \usepackage{caption}[2018/05/01] \usepackage{tikz} \newlength{\myHeight} \AtBeginDocument{\settoheight{\myHeight}{F}} \DeclareCaptionFormat{ToTheLeft}{% \raisebox{0pt}[0pt][0pt]{% \begin{minipage}[t]{0.3\linewidth} #1#2#3 \end{minipage}% }% \par\vspace{-\myHeight}% } \captionsetup[figure]{% name=Fig., format=ToTheLeft, position=above, justification=raggedright, singlelinecheck=false, skip=0pt, labelfont={normalsize,sf,up,bf}, labelsep=quad} \begin{document} \begin{figure} \caption{The function}\label{le-label} \centering \begin{tikzpicture}[x=0.7cm, y=0.7cm] \draw [->] (-4,0) -- (4,0) node [below left] {\(x\)} ; \draw [->] (0,-1.7) -- (0,2.3) node [below left] {\(y\)} ; \end{tikzpicture} \end{figure} \end{document}
N.B. : la commande \caption n'a pas accès aux dimensions ni à la position de la figure ; elle ne peut donc pas s'adapter automatiquement. -
Bonjour,
Svp j'ai utilisé le deuxième code, mais certaines figures (qui ont le nom qui contient beaucoup de mots) touche la figure, comment puis-je mettre un code spécifique pour ces figures pour que le nom soit en bas à gauche.
Merci beaucoup pour l'aide. -
J'ai mis la largeur de la minipage à 0.3\textwidth au pif, mais c'est modifiable (je viens d'ajouter l'option 'myCaptionWidth' pour permettre de le faire avec \captionsetup en cours de document, voir exemple de la figure 2 ci-dessous). Au-delà de cette largeur, le texte de la légende retourne à la ligne comme dans un paragraphe ordinaire (c'en est un). Il est également possible de définir des styles de légende différents et de changer de style en cours de document, comme le montre le fichier ci-joint. Je suis obligé de mettre le fichier en attachement à cause de l'argument optionnel 'b' de la minipage.
Edit : il est désormais possible de régler la largeur de la minipage en cours de document avec \captionsetup[figure]{myCaptionWidth=<dimen>}, où <dimen> représente une longueur. -
J'ai ajouté le paramètre 'myCaptionWidth' à mon message précédent ; il permet de régler facilement la largeur de la minipage utilisée pour les légendes, éventuellement même en cours de document.
-
Stp, comment puis-je fixer la position de la figure par rapport à la page? cette commande ne marche plus (après changement).
\begin{figure}[H]
Merci -
Le placement des figures et tables est normalement expliqué dans n'importe quel tutoriel LaTeX... par ailleurs, je ne sais pas ce que veut dire « ne marche plus » ici. Si [H] n'est pas reconnue comme option valide, c'est sans doute qu'il faut mettre \usepackage{float}. Notons qu'avec [H], il ne s'agit plus de flottants à proprement parler : un vrai flottant utilise des options parmi h, t, b et p (éventuellement toutes, éventuellement précédées de !) ; en fonction de ça, LaTeX décide où le placer.
-
Bonjour
Svp, comment peut-on remplir correctement les chemins et approcher les deux figures.
Merci.\begin{figure} \begin{minipage}[ b]{0.48\linewidth} \centering \begin{tikzpicture}[x=0.7cm, y=0.7cm] \draw [->] (-3,0) -- (3,0); \draw [->] (0,-1) -- (0,3) node [below right] {\(\rho\)} ; \draw [line width = 2pt] (-2.5,0) -- (-1.5,0) ; \draw[line width=2pt] plot (-1.5,0) to[out=0,in=180, looseness=.5] (0,2) to[out=0,in=180, looseness=.5] (1.5,0); \draw [line width = 2pt] (1.5,0) -- (2.5,0) ; \draw[fill,pattern=north west lines] (-1.5,0) to[out=28, in=180] (0,2)to[out=44,in=202] (1.5,0); \node[below left] at(0,0) {$0$}; \node[below] at(1.5,0) {$+1$}; \node[below] at(-1.5,0) {$-1$}; \end{tikzpicture} \caption{The functions $\rho$} \label{fig6} \end{minipage}\hfill \begin{minipage}[ b]{0.48\linewidth} \centering \begin{tikzpicture}[xshift=9.5cm,x=0.7cm, y=0.7cm] \draw [->] (-3,0) -- (3,0) ; \draw [dashed] (-2.5,0) -- (-.75,0) ; \draw [->] (0,-1) -- (0,5) node [below right] {\(\rho_{\epsilon}\)} ; \draw [line width = 2pt] (-2.5,0) -- (-.75,0) ; \draw[line width=2pt] plot (-.75,0) to[out=0, in=180, looseness=.25] (0,4) to[out=0,in=180, looseness=.25] (.75,0); \draw[fill,pattern=north west lines] (-.75,0) to[out=0,in=180, looseness=.5] (0,4) to[out=0,in=180, looseness=.5] (.75,0); \draw [line width = 2pt] (.75,0) -- (2.5,0) ; \node[below] at(-0.65,0) {$-\epsilon$}; \node[below] at(0.65,0) {$\epsilon$}; \end{tikzpicture} \caption{The approximation $\rho_{\epsilon}$}\label{fig7} \end{minipage} \end{figure}
-
Proposition.
\documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{patterns} \begin{document} \begin{figure} \centering \begin{tikzpicture}[x=0.7cm, y=0.7cm] \draw [->] (-3,0) -- (3,0); \draw [->] (0,-1) -- (0,2.8cm) node [below right] {\(\rho\)} ; \draw [thick] (-2.5,0) -- (-1.5,0) (1.5,0)--(2.5,0) ; %\draw[thick,fill,pattern=north west lines] (-1.5,0) to[out=0, in=180] (0,2)to[out=0,in=180] (1.5,0); \draw[thick,fill,pattern=north west lines] plot[domain=-2:2,samples=100] (\x,{2.*exp(-\x*\x/.4)}); \node[below left] at(0,0) {$0$}; \draw (1.5,3pt)--(1.5,-3pt) node[below] {\scriptsize$+1$}; \draw (-1.5,3pt)--(-1.5,-3pt) node[below] {\scriptsize$-1$}; \begin{scope}[xshift=5cm,x=.4cm,y=1.225 cm] \draw [->] (-3,0) -- (3,0); \draw [->] (0,-1) -- (0,2.8cm) node [below right] {\(\rho_\epsilon\)} ; \draw [thick] (-2.5,0) -- (-1.5,0) (1.5,0)--(2.5,0) ; \draw[thick,fill,pattern=north west lines] plot[domain=-2:2,samples=100] (\x,{2.*exp(-\x*\x/.4)}); % \node[below left] at(0,0) {$0$}; \draw (1.5,3pt)--(1.5,-3pt) node[below] {\scriptsize$\vphantom{-}\epsilon$}; \draw (-1.5,3pt)--(-1.5,-3pt) node[below] {\scriptsize$-\epsilon$}; \end{scope} \end{tikzpicture} \caption{The functions $\rho$ and the approximation $\rho_{\epsilon}$}\label{fig7} \end{figure} \end{document}
-
Bonjour,
- Comment on peut réduire la taille de l'axe des coordonnées de $\rho_{\epsilon}$ (en bas) ?
- Comment peut-on adapter l'environnement "scope" pour obtenir deux figure différentes (au lieu d'utiliser "minipage" ou "subfigure")?
Merci beaucoup. -
Non, sans doute pas, mais ce n'est pas ce qui est utile dans la proposition ci-dessus, à savoir l'utilisation d'une fonction ($a\exp(-x^2/b)$) plutôt qu'une ligne bricolée.
-
Bonjour
Comment puis-je améliorer ce code ?\begin{figure}[H] \centering \begin{tikzpicture}[x=0.75cm, y=0.75cm] \draw [->] (0,0) -- (7,0) node [below left] {\(x\)} ; \draw [->] (0,0) -- (0,3) node [ right] {\(f(x)=1-e^{-x}\)} ; \draw [dashed] (0,2.5) -- (6.5,2.5) ; \draw[very thick] plot[domain=0:6.5](\x,{1-exp(-\x)}); \begin{scope}[xshift=6.5cm,x=0.75cm,y=0.75cm] \draw [->] (0,0) -- (7,0) node [below right] {\(s\)} ; \draw [->] (0,0) -- (0,3) node [ right] {\(f^{\star}(s)\)} ; \draw [line width = 1pt] (0,2.5) -- (6.5,2.5) ; \end{scope} \end{tikzpicture} \caption{Example of a decreasing rearrangement $f^{\star}$}\label{Fig20} \end{figure}
[Mettre une ' ' entre [ et r sinon, l'afficheur du forum le prend pour une bannière BBcode de cadrage à droite. AD]
-
Je pense que tu devrais préciser dans quelle direction tu souhaites "améliorer", sinon, c'est difficile de répondre.
-
Bonjour,
Obtenir le graphe à gauche de la Figure 4 (sans déplacer ma ligne verticale).
Merci -
\documentclass[12pt]{article} \usepackage{tikz} \begin{document} \begin{figure}[h] \centering \begin{tikzpicture}[yscale=2.5,scale=.75] %[x=0.75cm, y=0.75cm] \draw [->] (0,0) -- (7,0) coordinate (labelX) node [anchor=north east] {\(x\)}; \draw [->] (0,0) -- (0,1.2) node [ right] {\(f(x)=1-e^{-x}\)}; %espace devant right pour le forum \draw [dashed] (0,1) -- (6.5,1); \draw[very thick] plot[domain=0:6.5](\x,{1-exp(-\x)}); \begin{scope}[shift=(labelX),xshift=15mm] \draw [->] (0,0) -- (7,0) node [anchor=north east] {\(s\)}; \draw [->] (0,0) -- (0,1.2) node [ right] {\(f^{\star}(s)\)}; \draw [line width = 1pt] (0,1) -- (6.5,1); \end{scope} \end{tikzpicture} \caption{Example of a decreasing rearrangement $f^{\star}$}\label{Fig20} \end{figure} \end{document}
-
Bonjour
Svp comment peut-on positionner 3 figures: j'ai utilisé quelques manipulations mais je n'obtiens pas les bonnes figures (sachant que j'utilise LaTeX package SVJour3)\documentclass[12pt]{article} \usepackage{graphicx} \usepackage{subfigure} \usepackage{caption} \usepackage{float} \begin{document} % 1 \begin{figure} \begin{subfigure}{.5\linewidth} \centering \includegraphics{Figure 2a.png} \caption{} \label{fig:sub1} \end{subfigure}% \begin{subfigure}{.5\linewidth} \centering \includegraphics{Figure 2a.png} \caption{} \label{fig:sub2} \end{subfigure}\\[1ex] \begin{subfigure}{\linewidth} \centering \includegraphics{Figure 2a.png} \caption{} \label{fig:sub3} \end{subfigure} \caption{Three subfigures} \label{fig:test} \end{figure} % 2 \begin{figure}[ht]% \centering \subfloat[]{\includegraphics{Figure 2a.png}\label{fig:a}}% \subfloat[]{\includegraphics{Figure 2a.png}\label{fig:b}}\\ \subfloat[]{\includegraphics{Figure 2a.png}\label{fig:c}}% \caption{Some caption}% \label{some-label}% \end{figure} % 3 \begin{figure} \begin{minipage}{.5\linewidth} \centering \subfloat[]{\label{main:a}\includegraphics[scale=.5]{Figure 2a.png}} \end{minipage}% \begin{minipage}{.5\linewidth} \centering \subfloat[]{\label{main:b}\includegraphics[scale=.5]{Figure 2a.png}} \end{minipage}\par\medskip \centering \subfloat[]{\label{main:c}\includegraphics[scale=.5]{Figure 2a.png}} \caption{my fig} \label{fig:main} \end{figure} \end{document}
-
Bonjour
Svp dois-je changer l'extension du images, j'obtient juste des images vides.
Merci -
Bonjour,
Quelle commande utilisez-vous pour compiler et où sont les images par rapport au document ?
Connectez-vous ou Inscrivez-vous pour répondre.
Bonjour!
Catégories
- 163.1K Toutes les catégories
- 7 Collège/Lycée
- 21.8K Algèbre
- 37.1K Analyse
- 6.2K Arithmétique
- 52 Catégories et structures
- 1K Combinatoire et Graphes
- 11 Sciences des données
- 5K Concours et Examens
- 11 CultureMath
- 47 Enseignement à distance
- 2.9K Fondements et Logique
- 10.3K Géométrie
- 62 Géométrie différentielle
- 1.1K Histoire des Mathématiques
- 68 Informatique théorique
- 3.8K LaTeX
- 39K Les-mathématiques
- 3.5K Livres, articles, revues, (...)
- 2.7K Logiciels pour les mathématiques
- 24 Mathématiques et finance
- 312 Mathématiques et Physique
- 4.9K Mathématiques et Société
- 3.3K Pédagogie, enseignement, orientation
- 10K Probabilités, théorie de la mesure
- 772 Shtam
- 4.2K Statistiques
- 3.7K Topologie
- 1.4K Vie du Forum et de ses membres