PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Problem mit tikz



e271
08-10-2014, 14:00
Hallo,

ich habe ein Problem bei der Dimensionierung der Achsen. Das erste Beispiel funktioniert, das zweite Beispiel dagegen nicht. Wo liegt der Fehler?


\documentclass[11pt, a4paper]{scrartcl}
\usepackage{pgf,tikz}
\usetikzlibrary{shapes,decorations.pathmorphing,ar rows}
\usepackage{tkz-base}
\usepackage{tkz-euclide}
\usepackage{tkz-fct}
\usetkzobj{all}
\begin{document}

% Beispiel 1
% Funktioniert

\begin{tikzpicture}[scale=0.4]
\tkzInit[xmin=35, xmax=45, ymin=26 ,ymax=58, ystep=4]
\tkzAxeXY
\tkzGrid \tkzDrawXY \tkzClip
\tkzFct[very thick]{x*x-80*x+1630}
\end{tikzpicture}

% Beispiel 2
% Funktioniert nicht

\begin{tikzpicture}[scale=0.4]
\tkzInit[xmin=37.5,xmax=42.5,ymin=29,ymax=37,xstep=0.5]
\tkzAxeXY
\tkzGrid \tkzDrawXY \tkzClip
\tkzFct[very thick]{x*x-80*x+1630}
\end{tikzpicture}

\end{document}

System: WIn7, MiKTeX 2.9, pdflatex

Danke im Voraus.

e271

esdd
09-10-2014, 13:42
Aus der Dokumentation zu tkz-fct


Lorsque xstep est différent de 1, il est nécessaire de remplacer x par \x.

Damit klappt dann auch das untere Beispiel, wobei ich die Schrift verkleinert habe.


\documentclass{scrartcl}
\usepackage{tkz-fct}
\begin{document}

% Beispiel 1
\begin{tikzpicture}[scale=0.4,font=\tiny]
\tkzInit[xmin=35, xmax=45, ymin=26 ,ymax=58, ystep=4]
\tkzAxeXY
\tkzGrid \tkzDrawXY \tkzClip
\tkzFct[very thick]{x*x-80*x+1630}
\end{tikzpicture}

% Beispiel 2
\begin{tikzpicture}[scale=0.4,font=\tiny]
\tkzInit[xmin=37.5,xmax=42.5,ymin=29,ymax=37,xstep=.5]
\tkzAxeXY
\tkzGrid \tkzDrawXY \tkzClip
\tkzFct[very thick]{\x*\x-80*\x+1630}
\end{tikzpicture}
\end{document}

Gruß
Elke

e271
10-10-2014, 15:37
Danke, Elke! Das war's.