Wie zeichnet man in LaTeX mit tikzpicture einen linearen Graphen für die Gleichung (22-x)/2?

Wie zeichnet man in LaTeX mit tikzpicture einen linearen Graphen für die Gleichung (22-x)/2?

Bildbeschreibung hier eingeben

Das habe ich bisher:

\begin{tikzpicture}
        \begin{axis}[xmin = 0, ymin=0, xlabel={$\omega_{m}$},ylabel={T}]
        \addplot[red, ultra thick](x, (22-x)/2);
        \end{axis}
    \end{tikzpicture}

Antwort1

Willkommen bei TeX.SE! Bitte stellen Sie immer MWE (Minimal Working Example) zur Verfügung, ein vollständiges kleines Dokument, das Ihr Problem reproduziert.

Bildbeschreibung hier eingeben

\documentclass[margin=3mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}

\begin{document}
    \begin{tikzpicture}
\begin{axis}[
    axis lines = middle,
    xlabel={$\omega_{m}$},
    ylabel={T},
    label style = {below left},
    xmin=0, xmax=28, xtick={22},
    ymin=0, ymax=13, ytick={11}]
\addplot[red, ultra thick, domain=0:22] {(22-x)/2};
\end{axis}
    \end{tikzpicture}
\end{document}

verwandte Informationen