Tikz Cheat Sheet

ADVERTISEMENT

Ti Z Cheat Sheet
Anders O.F. Hendrickson
Concordia College, Moorhead, Minnesota
May 17, 2010
Coordinate Specifications
library needed
Cartesian coordinates
(x,y)
polar coordinates
(θ:r)
coordinate calculations
($ (A) + {sin(60)}*(B) $)
calc
partway calculations
($ (A)!.25!(B) $)
calc
3cm from (A) in direction of (B)
($ (A)!3cm!(B) $)
calc
stretch by 1.2, then rotate by 30
($ (A)!1.2!30:(B) $)
calc
projection of point B onto line AC
($ (A)!(B)!(C) $)
calc
project B onto line AC, then rotate by 30
($ (A)!(B)!30:(C) $)
calc
position new node 1cm above existing anchor
\node[above=1cm of somenode.north]
positioning
General
name a point X
\coordinate (X) at (3,5);
place a node and name it X
\node[
] (X) at (3,5) {};
Paths
rectangle
\path (A) rectangle (B);
line
\path (A) -- (B);
move from (B) to (C) without drawing
\path (A) -- (B) (C) -- (D);
circle of radius 4
\path (A) circle (4);
ellipse of width 6 and height 4
\path (A) ellipse(3 and 2);
circular arc of radius r from angle θ
to θ
\path (A) arc(θ
:r) (B);
1
2
1
2
and r
elliptical arc
\path (A) arc(θ
:r
) (B);
1
2
1
2
B´ e zier curve
\path (A) .. controls (C1) and (C2) .. (B);
a grid
\path (A) grid (B);
options: step, xstep, ystep, helplines
parabola (several options for bending)
\path (A) parabola (B);
sine curve from (0, 0) to (π/2, 1)
\path (A) sin (B);
cosine curve from (0, 0) to (π/2, 1)
\path (A) cos (B);
return to start and join up nicely
-- cycle
Path Options
smooth all corners in the path
[rounded corners], [rounded corners=10pt]
[loop]
Path widths
Path dashing
Arrowheads
[ultra thin]
[solid]
[-stealth]
[very thin]
[dotted]
[-latex]
[thin]
[densely dotted]
[-to]
[semithick]
[loosely dotted]
[thick]
[dashed]
[very thick]
[densely dashed]
[ultra thick]
[loosely dashed]

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go
Page of 3