tikzpicture - Funktionsgraph bricht ab Thema ist als GELÖST markiert

Formelsatz für Mathematik, Naturwissenschaften und Technik


steve-cologne
Forum-Newbie
Forum-Newbie
Beiträge: 2
Registriert: Fr 13. Dez 2024, 19:27

tikzpicture - Funktionsgraph bricht ab

Beitrag von steve-cologne »

Hallo,
ich habe Probleme mit dem Zeichnen eines Funktionsgraphs mit tikzpicture - die Linie bricht bei x = 5 ab, ich kann machen was ich will. Hier der Code
\begin{tikzpicture}
		\begin{axis} [
			axis lines = middle,
             	        xscale = 0.6,  
               	        yscale = 0.6,
			xmin = -1, 
			xmax = 7,  
			ymin = -20, 
			ymax = 20,
			xlabel = \(x\),
			ylabel = \(y\),
			]
			\addplot +
			[
			no marks,
			thick,
			color = blue,
			samples = 200
			]
			{(-(1/3) * x^3) + (4 * x^2) - (15*x) + 10};
		\end{axis}
\end{tikzpicture}

Und so sieht der Graph aus - er hört bei x = 5 auf, ich möchte ihn aber bis x = 7 zeichnen:
abbrechender Graph.jpg
.
Ich bin für jede Hilfe dankbar!
Gruß
Stefan

Bartman
Forum-Meister
Forum-Meister
Beiträge: 2465
Registriert: Do 16. Jul 2009, 21:41
Wohnort: Hessische Provinz

Re: tikzpicture - Funktionsgraph bricht ab

Beitrag von Bartman »

Sorge bitte für ein vollständiges Minimalbeispiel, damit wir es, z. B. mit dem Online-Compiler, testen können.

Versuche, die Liste der Optionen der Umgebung axis oder des Befehls \addplot um die folgende Option zu ergänzen:
domain=\pgfkeysvalueof{/pgfplots/xmin}:\pgfkeysvalueof{/pgfplots/xmax}

steve-cologne
Forum-Newbie
Forum-Newbie
Beiträge: 2
Registriert: Fr 13. Dez 2024, 19:27

Re: tikzpicture - Funktionsgraph bricht ab

Beitrag von steve-cologne »

Danke, ich habe inzwischen die Lösung in einem anderen Forumsbeitrag gefunden: Domain=-2:7

Antworten