dimanche 8 décembre 2013

Diagramme en boite

Voici le code LaTeX de ce diagramme en boite :

\psset{xunit=1cm , yunit=1cm}
\begin{pspicture*}(-2,-2.8)(12,3.2)
\def\xmin{-1} \def\xmax{11} \def\ymin{0} \def\ymax{1.4}
%\psframe[linewidth=0pt,linecolor=gray](-2,-2.8)(12,3.2)
\def\pshlabel#1{\psframebox*[framesep=1pt]{\small #1}}
\def\psvlabel#1{\psframebox*[framesep=1pt]{\small #1}}
\psset{xunit=1cm,yunit=2.4cm}
%\psgrid[griddots=25,gridlabels=0pt,gridwidth=.8pt, gridcolor=gray, subgridwidth=.8pt, subgridcolor=gray, subgriddiv=1](0,0)(-1,0)(11,1.4)
\psset{xunit=1cm , yunit=1cm}
\newrgbcolor{couleur1}{0.6549 0.6549 0}
\newrgbcolor{couleur2}{0 0.3176 0.4745}
\newrgbcolor{couleur3}{0.0941 0.647 0.0196}
\psframe[linewidth=1.2pt,linecolor=black,linestyle=solid](2,1.8)(5.5,2.6)
\psdots(0,0)
\uput[d](0,0){$x_{min}$}

\psdots(2,0)
\uput[d](2,0){$Q_{1}$}

\psdots(4,0)
\uput[d](4,0){$Me$}

\psdots(5.5,0)
\uput[d](5.5,0){$Q_{3}$}

\psdots(10,0)
\uput[d](10,0){$x_{max}$}


\psline[linewidth=1.2pt,linecolor=black,linestyle=solid]{-}(4,1.8)(4,2.6)
\psline[linewidth=1.2pt,linecolor=black,linestyle=dotted]{-}(4,0)(4,1.8)
\psline[linewidth=1.2pt,linecolor=black,linestyle=dotted]{-}(2,0)(2,1.8)
\psline[linewidth=1.2pt,linecolor=black,linestyle=dotted]{-}(5.5,0)(5.5,1.8)

\psline[linewidth=1.2pt,linecolor=black,linestyle=solid]{-}(0,2.2)(2,2.2)
\psline[linewidth=1.2pt,linecolor=black,linestyle=solid]{-}(5.5,2.2)(10,2.2)

\psline[linewidth=1.2pt,linecolor=black,linestyle=solid]{-}(0,2.05)(0,2.35)
\psline[linewidth=1.2pt,linecolor=black,linestyle=dotted]{-}(0,2.05)(0,0)

\psline[linewidth=1.2pt,linecolor=black,linestyle=solid]{-}(10,2.05)(10,2.35)
\psline[linewidth=1.2pt,linecolor=black,linestyle=dotted]{-}(10,2.05)(10,0)

\psaxes[labels=none,yAxis=false,labelsep=0pt,ticksize=0pt,Dx=1,Ox=\xmin,Oy=\ymin]{->}(\xmin,0)(\xmin,0)(\xmax,0.1)


\rput[B](1,1){$25\%$}
\rput[B](3,1){$25\%$}
\rput[B](4.8,1){$25\%$}
\rput[B](7.6,1){$25\%$}
\pcline{<->}(2,-1)(5.5,-1) \bput{:U}{écart intercartile}
\pcline{<->}(0,-2)(10,-2) \bput{:U}{étendue}

\end{pspicture*}

1 commentaire: