Grâce à :

Ouvrir dans l'éditeur Overleaf
\begin{center}
\begin{tikzpicture}
\draw[->,>=stealth][very thin](0,0)--(18.5,0);
\draw (16.5,-1) node[right] {$taille\, ($nm$)$};
\draw [->,>=stealth][very thick](0,0)--(0,9);
\draw (0,9) node[above] {$intensité\, (u.a.)$};
\draw (0,-0.2) node[below] {$0,1$};
\draw (3.5,-0.2) node[below] {$1$}; \draw (3.5,-0.1)--(3.5,0.1);
\draw (7,-0.2) node[below] {$10$}; \draw (7,-0.1)--(7,0.1);
\draw (10.5,-0.2) node[below] {$100$}; \draw (10.5,-0.1)--(10.5,0.1);
\draw (14,-0.2) node[below] {$1000$}; \draw (14,-0.1)--(14,0.1);
\draw (17.5,-0.2) node[below] {$10000$}; \draw (17.5,-0.1)--(17.5,0.1);
\draw (-0.1,0) node[left] {$0$};
\draw (-0.1,1) node[left] {$2$}; \draw(-0.1,1)--(0.1,1);
\draw (-0.1,2) node[left] {$4$}; \draw(-0.1,2)--(0.1,2);
\draw (-0.1,3) node[left] {$6$}; \draw(-0.1,3)--(0.1,3);
\draw (-0.1,4) node[left] {$8$}; \draw(-0.1,4)--(0.1,4);
\draw (-0.1,5) node[left] {$10$}; \draw(-0.1,5)--(0.1,5);
\draw (-0.1,6) node[left] {$12$}; \draw(-0.1,6)--(0.1,6);
\draw (-0.1,7) node[left] {$14$}; \draw(-0.1,7)--(0.1,7);
\draw (-0.1,8) node[left] {$16$}; \draw(-0.1,8)--(0.1,8);
\draw[thick,smooth,color=red] plot file {DLS_pluroniqueF127_conc50_temp20.txt};
\draw[thick,smooth,color=purple] plot file {DLS_pluroniqueF127_conc50_temp25.txt};
\draw[thick,smooth,color=blue] plot file {DLS_pluroniqueF127_conc50_temp30.txt};
\draw[thick,smooth,color=bleuturquoise] plot file {DLS_pluroniqueF127_conc50_temp35.txt};
\draw[thick,smooth,color=black] plot file {DLS_pluroniqueF127_conc50_temp40.txt};
\end{tikzpicture}
\end{center}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Je trace cinq courbes sur un même graphique. Je souhaiterais translater quatre d'entre elles vers le haut afin de rendre le graphique plus lisible.

Comment faire pour « shifter » la deuxième courbe de 2 cm, la troisième de 4 cm, la quatrième de 6 cm et la cinquième de 8 cm vers le haut afin qu'elle ne se recouvrent pas, en sachant que les valeurs sont dans des fichiers .txt ?

Nota : les valeurs sont données à titre indicatif.

Posée 21 Fév '19, 20:15

ettoremajorana's gravatar image

ettoremajorana
1912915
Taux d'acceptation : 0%

Modifiée 22 Fév '19, 04:25

Pathe's gravatar image

Pathe ♦♦
7.6k49208252

Chiffeter? :o)

(21 Fév '19, 21:12) Bernard Bernard's gravatar image

mais pour les figures type graphiques mathématiques, il faut mieux privilégier pgfplots non ? Redessiner les axes et tout en permanence, c'est vraiment fastidieux !

(23 Fév '19, 21:42) pluton pluton's gravatar image
1

@ettoremajorana Pourriez-vous s'il vous plaît accepter une réponse.

(03 Avr '19, 01:36) touhami touhami's gravatar image

On pourrait utiliser yshift=<...>.

Sans rapport avec le problème :

  • au lieu de \begin{center} ... \end{center}, je suggère \centering pour éviter l'espace supplémentaire.

  • n'utilisez pas $...$ pour texte comme intensité. Si vous voulez du texte en italique, utilisez \textit{...}.

  • avec 0,1 vous obtenez un espacement incorrect. Utilisez 0{,}1 ou l'extension icomma


Ouvrir dans l'éditeur Overleaf
\documentclass{article}
\usepackage{tikz}
\colorlet{bleuturquoise}{cyan}
\usepackage{filecontents}
\begin{filecontents*}{test.txt}
1 2
2 4
4 2
8 1
\end{filecontents*}
\begin{document}
\begingroup
\centering
\begin{tikzpicture}
\draw[->,>=stealth][very thin](0,0)--(18.5,0);
\draw (16.5,-1) node[right] {\textit{taille (nm)}};
\draw [->,>=stealth][very thick](0,0)--(0,9);
\draw (0,9) node[above] {\textit{intensité (u.a.)}};
\draw (0,-0.2) node[below] {$0{,}1$};
\draw (3.5,-0.2) node[below] {$1$}; \draw (3.5,-0.1)--(3.5,0.1);
\draw (7,-0.2) node[below] {$10$}; \draw (7,-0.1)--(7,0.1);
\draw (10.5,-0.2) node[below] {$100$}; \draw (10.5,-0.1)--(10.5,0.1);
\draw (14,-0.2) node[below] {$1000$}; \draw (14,-0.1)--(14,0.1);
\draw (17.5,-0.2) node[below] {$10000$}; \draw (17.5,-0.1)--(17.5,0.1);
\draw (-0.1,0) node[left] {$0$};
\draw (-0.1,1) node[left] {$2$}; \draw(-0.1,1)--(0.1,1);
\draw (-0.1,2) node[left] {$4$}; \draw(-0.1,2)--(0.1,2);
\draw (-0.1,3) node[left] {$6$}; \draw(-0.1,3)--(0.1,3);
\draw (-0.1,4) node[left] {$8$}; \draw(-0.1,4)--(0.1,4);
\draw (-0.1,5) node[left] {$10$}; \draw(-0.1,5)--(0.1,5);
\draw (-0.1,6) node[left] {$12$}; \draw(-0.1,6)--(0.1,6);
\draw (-0.1,7) node[left] {$14$}; \draw(-0.1,7)--(0.1,7);
\draw (-0.1,8) node[left] {$16$}; \draw(-0.1,8)--(0.1,8);
\draw[thick,smooth,color=red,yshift=0cm] plot file {test.txt};
\draw[thick,smooth,color=purple,yshift=2cm] plot file {test.txt};
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

alt text


Une autre solution avec l'extension pgfplots (ça va dessiner automatiquement les axes) :

Ouvrir dans l'éditeur Overleaf
\documentclass{article}
\usepackage{pgfplots}
\colorlet{bleuturquoise}{cyan}
\usepackage{filecontents}
\begin{filecontents*}{test.txt}
1 2
10 4
100 2
1000 1
\end{filecontents*}
\begin{document}
\begingroup
\centering
\begin{tikzpicture}
\begin{axis}[
xlabel={taille (nm)},
ylabel={intensité (u.a.)},
axis lines=left,
ymax=12,
xmode=log,
log ticks with fixed point,
]
\addplot [red,thick,smooth] table {test.txt};
\addplot [purple,thick,smooth,yshift=1cm] table {test.txt};
\addplot [blue,thick,smooth,yshift=2cm] table {test.txt};
\addplot [bleuturquoise,thick,smooth,yshift=3cm] table {test.txt};
\addplot [black,thick,smooth,yshift=4cm] table {test.txt};
\end{axis}
\end{tikzpicture}
\endgroup
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

alt text

Lien permanent

Publiée 21 Fév '19, 21:05

samcarter's gravatar image

samcarter
8.6k2817
Taux d'acceptation : 57%

Modifiée 21 Fév '19, 23:26

Pathe's gravatar image

Pathe ♦♦
7.6k49208252

Quelle est l'utilité de "log ticks with fixed point" ?

(25 Fév '19, 19:35) ettoremajorana ettoremajorana's gravatar image
3

@ettoremajorana C'est pour avoir 1, 10, 100, ... au lieu de 10^0, 10^1, 10^2, ...

(25 Fév '19, 19:39) samcarter samcarter's gravatar image

Comment afficher la légende des courbes ?

(25 Fév '19, 20:06) ettoremajorana ettoremajorana's gravatar image
4

@ettoremajorana Merci de poser une nouvelle question pour avoir de l'aide sur l'affichage de la légende de courbes.

(25 Fév '19, 20:15) denis ♦♦ denis's gravatar image
Votre réponse
[Masquer l'aperçu]

Suivre cette question

Par courriel :

Une fois que vous serez enregistré, vous pourrez souscrire à n'importe quelle mise à jour ici

Par flux RSS :

Réponses

Réponses et commentaires

Mots-clés de la question :

×109
×24
×7

Question posée : 21 Fév '19, 20:15

Question vue : 7,271 fois

Dernière mise à jour : 03 Avr '19, 01:36

C'est votre première visite ici ? Consultez la FAQ !

×