Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[border=2pt]{standalone}
- usepackage[utf8]{inputenc}
- usepackage{graphics}
- usepackage{tikz,pgfplots}
- usetikzlibrary{math} % Pour evaluate
- usetikzlibrary{calc} % Pour postionnement relatif
- newcommand*{addZsupaUn}[2]{
- addplot[#2,samples=60,domain=0:Ttrace,thick=3pt,ultra thick,
- evaluate={ Tun = (1 / ( 6 *(#1-sqrt(#1^2 -1)) ));
- Tdeux = (1 / ( 6 *(#1+sqrt(#1^2 -1)) )); }
- ] { K * (1 - ( 1/( Tun - Tdeux ) )*( Tun *exp(-x/ Tun ) - Tdeux *exp(-x/ Tdeux ) )) };
- }
- %newcommand*{LegendFlecheSup}[5]{
- % coordinate[evaluate={ Tun = (1 / ( 6 *(#1-sqrt(#1^2 -1)) ));
- % Tdeux = (1 / ( 6 *(#1+sqrt(#1^2 -1)) )); }
- % ] (C2) at (axis cs:#2, { K * (1 - ( 1/( Tun - Tdeux ) )*( Tun *exp(-#2/ Tun ) - Tdeux *exp(-#2/ Tdeux ) )) }) ;
- % draw node[anchor=#3] (#4) at #5 {$z =#2$};
- % draw[fleche] (C2) -- (#4.west) ;
- %}
- newcommand*{LegendFlecheSup}[5]{
- coordinate (C2) at (axis cs:#2, { K * (1 - ( 1/( 0.622 - 0.04466 ) )*( 0.622 *exp(-#2/ 0.622 ) - 0.04466 *exp(-#2/ 0.04466 ) )) }) ;
- draw node[anchor=#3] (#4) at #5 {$z =#2$};
- draw[fleche] (C2) -- (#4.west) ;
- }
- tikzset{ fleche/.style={<-,>=latex,line width=0.2mm,shorten <=-0.02cm} }
- begin{document}
- begin{tikzpicture}
- defK{2}
- defw{(3.14159*2)}
- %defw{(3.14159*2/Ttrace)/sqrt(1-z^2)}
- defTtrace{3}
- begin{axis}[axis x line=bottom, axis y line = left ,
- width=13cm, height=axisdefaultheight,
- ymax=1.55*K,%axis lines=none,
- ytick=empty,extra y ticks={K}, extra y tick labels={},extra y tick style={grid=major},
- %xtick=empty,
- ]
- addplot[samples=2,domain=0:(Ttrace+0.1),thick=1pt] { K };
- % z > 1 -----
- addZsupaUn{2}{blue,densely dotted}
- addZsupaUn{4}{blue,densely dotted}
- LegendFlecheSup{4}{0.6}{west}{C3}{($(C2)+(axis cs:1,-0.5)$)}
- % LegendFlecheSup{2}{0.6}{south}{C4}{(C3.north)}
- end{axis}
- end{tikzpicture}
- end{document}
- ! Undefined control sequence.
- <argument> axis cs:0.6, { K * (1 - ( 1/( Tun
- - Tdeux ) )*( Tun *exp(-0.6...
- l.55 end{axis}
- newcommand*{LegendFlecheSup}[5]{
- pgfmathparse{(1 / ( 6 *(#1-sqrt(#1^2 -1)) ))} pgfmathresult letTunpgfmathresult
- pgfmathparse{(1 / ( 6 *(#1+sqrt(#1^2 -1)) ))} pgfmathresult letTdeuxpgfmathresult
- coordinate (C2) at (axis cs:#2, { K * (1 - ( 1/( Tun - Tdeux ) )*( Tun *exp(-#2/ Tun )
- - Tdeux *exp(-#2/ Tdeux ) )) }) ;
- draw node[anchor=#3] (#4) at #5 {$z =#2$};
- draw[fleche] (C2) -- (#4.west) ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement