von Jaffet » Mi 16. Sep 2020, 15:03
Hallo,
es geht um den folgenden Code-Ausschnitt. Kann mir jemand erklären, was des in Zeile 10 mit dem Ausdruck $(1,0)!\i!(3,2)$ auf sich hat?
\documentclass[margin=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{intersections}
\usepackage{pgfmath} % LATEX
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}[x=2cm, y=2cm,domain=-9:9,very thin]
%Raster zeichnen
\foreach \i in {0.5,1.5,2.5,3.5,4.5,5.5} \node at ($(1,0)!\i!(3,2)$) {\i};
\coordinate[ label=left:$U_L$ ] ( y-Start) at ( 0 , 0 );
\coordinate[ label=left:$U_H$ ] ( y-End) at ( 0 , 1 );
\draw [color=black!70] [step=20mm] (0,0) grid (10,1);
% Achsen zeichnen
\draw[->,thick] (0,0) -- (10,0) node[below right] {T};
\draw[->,thick] (0,0) -- (0,1) node[below right] {};
%y-Achse
% Achsen beschriften
%\draw (\c,0) -- (\c,.1) node[below=4pt] {$\scriptstyle\c$};
%y-Achse
%\node ( <name> ) at (0,0) [ <stiloptionen> | <label> ] {};
%\draw (0,0) -- (0,1) node[left=4pt]{$U_H$};
%Funktionen zeichnen:
%\path[name path=rahmen,clip](-11,-9) rectangle (11,9);
%\draw[name path=p1] plot (\x, {2*pow(\x-3,2)-3});
%\draw[name path=p2] plot (\x, {-1*pow(\x-3,2)+1});
%\draw[name path=p4] plot (\x, {-0.4*pow(\x+3,2)+1});
%Funktionen beschriften:
%\foreach \p/\o in {1/below right,2/above right,4/above right}
%\path[name intersections={of=rahmen and p\p}]node[\o] at (intersection-2){$p_\p$};
\end{tikzpicture}
\end{document}
Hallo,
es geht um den folgenden Code-Ausschnitt. Kann mir jemand erklären, was des in Zeile 10 mit dem Ausdruck $(1,0)!\i!(3,2)$ auf sich hat?
[code]
\documentclass[margin=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{intersections}
\usepackage{pgfmath} % LATEX
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}[x=2cm, y=2cm,domain=-9:9,very thin]
%Raster zeichnen
\foreach \i in {0.5,1.5,2.5,3.5,4.5,5.5} \node at ($(1,0)!\i!(3,2)$) {\i};
\coordinate[ label=left:$U_L$ ] ( y-Start) at ( 0 , 0 );
\coordinate[ label=left:$U_H$ ] ( y-End) at ( 0 , 1 );
\draw [color=black!70] [step=20mm] (0,0) grid (10,1);
% Achsen zeichnen
\draw[->,thick] (0,0) -- (10,0) node[below right] {T};
\draw[->,thick] (0,0) -- (0,1) node[below right] {};
%y-Achse
% Achsen beschriften
%\draw (\c,0) -- (\c,.1) node[below=4pt] {$\scriptstyle\c$};
%y-Achse
%\node ( <name> ) at (0,0) [ <stiloptionen> | <label> ] {};
%\draw (0,0) -- (0,1) node[left=4pt]{$U_H$};
%Funktionen zeichnen:
%\path[name path=rahmen,clip](-11,-9) rectangle (11,9);
%\draw[name path=p1] plot (\x, {2*pow(\x-3,2)-3});
%\draw[name path=p2] plot (\x, {-1*pow(\x-3,2)+1});
%\draw[name path=p4] plot (\x, {-0.4*pow(\x+3,2)+1});
%Funktionen beschriften:
%\foreach \p/\o in {1/below right,2/above right,4/above right}
%\path[name intersections={of=rahmen and p\p}]node[\o] at (intersection-2){$p_\p$};
\end{tikzpicture}
\end{document}
[/code]