TransWikia.com

How do I plot a grid with tikz

TeX - LaTeX Asked by anz caz on August 2, 2021

enter image description here

But I need dashed boxes and blue color (better semi transparent):/ Too new to tikz, no Idea how to embed grid into labled axis..

One Answer

Read first tutorials in TikZ documentation and try to understand this:

documentclass[border=2mm, tikz]{standalone}
begin{document}
begin{tikzpicture}[font=ttfamily]
foreach i in {0,1,2,3}{
    foreach j [evaluate=j as ni using {int(i*2+j)}] in {0,1}
        node[draw, dashed, fill=blue!30, opacity=.5, minimum size=1cm] (ni) at (i,j) {ni};}
draw[->] (0.south west)--++(90:2.5) node[above]{x_domains=(0y)};
draw[->] (0.south west)--++(0:4.5) node[right]{y_domains=(0x)};
end{tikzpicture}
end{document}

enter image description here

Correct answer by Ignasi on August 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP