I create a rectangle like this:
\draw (2,2) -- (2,4) -- (6,4) -- (6,2) -- (2,2);
I would like to give the red colour to the side defined by points (2,2) and (2,4).
I tried doing
\draw [red] (2,2) -- (2,4) -- (6,4) -- (6,2) -- (2,2);
but this colours the entire rectangle.
-- cycle
rather than-- (a,b)
where(a,b)
are the coordinates of the first point.