Tag Info

New answers tagged


The use of /tikz/x=<dimension> and /tikz/y=<dimension> is documented in section 25.2 of the TikZ manual (p. 358-9 currently). Roughly, x=8cm says that each unit in the x direction is 8cm. Similarly for y. So if you pass x=8cm, y=4cm to the tikzpicture environment, then (1,1) will be 8cm to the right of the origin and 4cm above it. Hence, (0,0) ...


Apart from what cfr said about [x=8cm,y=4cm] that sets the step for the x and y axis, There is a much easier way to do the same thing (red is mine). Output Code \documentclass[margin=10pt]{standalone} \usepackage{tikz}%, tkz-euclide} %\usetkzobj{all} \begin{document} \begin{tikzpicture}%[x=8cm,y=4cm] %\tkzInit[xmax=2,ymax=1,xmin=0,ymin=0] ...


Your rectangles come from the first line, where you write [x=8cm,y=4cm]. This is redefining the units used for x and y. Retry your code with [x=4cm,y=4cm]or even removing it completely and see what happens. I took the liberty of changing your rectangle defining code, using relative coordinate computations, with ++(0.1,0.1). This way less thinking goes into ...


\pgfmathanglebetweenpoints helps: \draw[->,ultra thick,black] (origo) -- ++($(phase_a) + (phase_b) + (phase_c)$) coordinate(Vstip); \pgfmathanglebetweenpoints{\pgfpointanchor{origo}{center}} {\pgfpointanchor{Vstip}{center}} \let\PhaseBlack\pgfmathresult Result is phase in macro \PhaseBlack: 19.99997

Top 50 recent answers are included