To draw a rectangle and fill it in gray in TikZ:
\draw [fill=gray,very thick] (0,0) rectangle (2,1);
Now, I want to fill it in both gray and yellow. The best way would be if I can make diagonal stripes of gray and yellow alternately. Is there a way to do that?
Best Answer
A bit tricky solution without defining custom pattern for rectangle
a=2xb
.