Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[border=5mm]{standalone}
- usepackage{tikz}
- usetikzlibrary{calc}
- usetikzlibrary{backgrounds} % For testing with "framed" option to look at the bounding box
- usepackage{pgfplots}
- pgfplotsset{compat=1.10}
- usepgfplotslibrary{fillbetween}
- usetikzlibrary{patterns}
- pgfplotsset{ticks=none}
- begin{document}
- begin{tikzpicture}[hatched/.style = {pattern=north west lines, opacity=0.3}, scale=4]
- begin{scope}
- draw[line width=0.2cm] (0, 0) -- (2, 0) -- (2, 1) -- (1, 1) -- (1, 2) -- (2, 2) -- (2, 3) -- (0, 3) -- cycle;
- fill[red] (0, 0) -- (2, 0) -- (2, 1) -- (1, 1) -- (1, 2) -- (2, 2) -- (2, 3) -- (0, 3) -- cycle;
- end{scope}
- begin{scope}[xshift=1cm, yshift=3cm]
- draw[line width=0.2cm] (0, 0) -- (2, 0) -- (2, 1) -- (1, 1) -- (1, 2) -- (2, 2) -- (2, 3) -- (0, 3) -- cycle;
- fill[red] (0, 0) -- (2, 0) -- (2, 1) -- (1, 1) -- (1, 2) -- (2, 2) -- (2, 3) -- (0, 3) -- cycle;
- end{scope}
- begin{scope}[xshift=2cm, yshift=6cm]
- draw[line width=0.2cm] (0, 0) -- (2, 0) -- (2, 1) -- (1, 1) -- (1, 2) -- (2, 2) -- (2, 3) -- (0, 3) -- cycle;
- fill[red] (0, 0) -- (2, 0) -- (2, 1) -- (1, 1) -- (1, 2) -- (2, 2) -- (2, 3) -- (0, 3) -- cycle;
- end{scope}
- end{tikzpicture}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement