von basti-fantasti-48 » Mi 13. Mär 2024, 09:27
% Automatisch ergänzter Code
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
% Ende des automatisch ergänzten Codes
\begin{tikzpicture}
\begin{axis}[
xlabel={x},
%ylabel={y},
ymax=1.1,
grid=major,
domain=0:5,
samples=100,
axis lines=left,
legend pos=south east,
]
\addplot[red,domain=0:1,line width=1.5pt] {x^2};
\addlegendentry{2}
\addplot[blue,domain=0:1,line width=1.5pt] {x};
\addlegendentry{$1$}
\end{axis}
\end{tikzpicture}
% Automatisch ergänzter Code
\end{document}
% Ende des automatisch ergänzten Codes
Moin bei diesem Beispiel finde ich es komisch dass im Ursprung des Koordinatensystems zweimal null steht also für jede Achse. Wäre schöner wenn nur einmal null steht. Wie geht das?
[code]
% Automatisch ergänzter Code
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
% Ende des automatisch ergänzten Codes
\begin{tikzpicture}
\begin{axis}[
xlabel={x},
%ylabel={y},
ymax=1.1,
grid=major,
domain=0:5,
samples=100,
axis lines=left,
legend pos=south east,
]
\addplot[red,domain=0:1,line width=1.5pt] {x^2};
\addlegendentry{2}
\addplot[blue,domain=0:1,line width=1.5pt] {x};
\addlegendentry{$1$}
\end{axis}
\end{tikzpicture}
% Automatisch ergänzter Code
\end{document}
% Ende des automatisch ergänzten Codes[/code]
Moin bei diesem Beispiel finde ich es komisch dass im Ursprung des Koordinatensystems zweimal null steht also für jede Achse. Wäre schöner wenn nur einmal null steht. Wie geht das?