figure statistique en bars

📅 March 30, 2024   |   👁️ Views: 27




Votre navigateur ne supporte pas les PDFs. Voir le Lien de Téléchargement au dessous .

\documentclass{article}
\usepackage{pgfplots}

\begin{document}

\begin{figure}[h]
    \centering
    \begin{tikzpicture}
    \begin{axis}[
        ybar,
        bar width=15pt,
        xlabel={Temperature (°C)},
        ylabel={nombre d'individus},
        xtick={1,2,...,9},
        xticklabels={<10, 10-14, 15-19, 20-24, 25-29, 30-34, 35-39, >45},
        x tick label style={rotate=45, anchor=east, xshift=5pt, yshift=-7pt},
        xlabel style={yshift=-1cm},
        ]
        \addplot[fill=blue!30] coordinates {
            (1,0)
            (2,1)
            (3,11)
            (4,45)
            (5,159)
            (6,77)
            (7,18)
            (8,4)
            (9,0)
        };
    \end{axis}
    \end{tikzpicture}
    \caption{nombre d'individus en different temperatures}
    \label{fig:temperature_chart}
\end{figure}

\end{document}


Related Courses, Exams, and Exercises


Course PDF:

📥 Download figure statistique en bars (PDF)