Funktionsgraph wird nur partiell geplottet Thema ist als GELÖST markiert

Formelsatz für Mathematik, Naturwissenschaften und Technik


Neo
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 61
Registriert: Mo 21. Dez 2020, 20:36

Funktionsgraph wird nur partiell geplottet

Beitrag 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}

Benutzeravatar
Stefan Kottwitz
Admin
Admin
Beiträge: 2534
Registriert: Di 8. Jul 2008, 00:39
Kontaktdaten:

Re: Funktionsgraph wird nur partiell geplottet

Beitrag von Stefan Kottwitz »

Hallo Neo,

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

Stefan

Neo
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 61
Registriert: Mo 21. Dez 2020, 20:36

Re: Funktionsgraph wird nur partiell geplottet

Beitrag von Neo »

Super! Danke!

Antworten