Seite 1 von 1

Funktionsgraph wird nur partiell geplottet

Verfasst: So 9. Jul 2023, 15:00
von Neo
Hallo,
ich möchte die Funktion r(x) = 0.0756*x^2 + 9.76 plotten für die eingestellten Wartebereiche der Achsen. Allerdings ist der Graph nur von x=-5 bis x=5 abgebildet. Hat jemand eine Idee, wie das funktioniert?
\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
    scale only axis,
    grid = major,
    axis lines = middle,
    xlabel={$r$ in cm},
    ylabel={$A$ in cm$^2$},
    xtick={-30,-25,...,30},
    ytick={0,5,...,40},
    ymin = 0,
    ymax = 50,
    xmin = -30,
    xmax = 30,
]
\addplot (x,{0.0756*x^2 + 9.76});
\end{axis}
\end{tikzpicture}
\end{document}

Re: Funktionsgraph wird nur partiell geplottet

Verfasst: So 9. Jul 2023, 15:07
von Stefan Kottwitz
Hallo Neo,

füge einfach domain=-30:30 zu den Achsenoptionen oder zu \addplot hinzu,

Stefan

Re: Funktionsgraph wird nur partiell geplottet

Verfasst: Mo 10. Jul 2023, 07:23
von Neo
Super! Danke!