1

I want to create some sort of arrangement of small(!) dots (some filled, some not) in a 3x3 shape like this

picture

Has anyone an idea how to do this?

TeXnician
  • 33,589
  • 1
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – BambOo Sep 27 '18 at 11:25
  • 2
    Not clear what exactly you want, but here are some for consideration: https://tex.stackexchange.com/questions/390466/drawing-grids-with-different-colors, https://tex.stackexchange.com/questions/135892/any-package-for-matrix-diagram, https://tex.stackexchange.com/questions/308936/what-is-the-best-way-to-create-this-kind-of-binary-matrix, https://tex.stackexchange.com/questions/157080/can-tikz-create-pixel-art-images – Steven B. Segletes Sep 27 '18 at 11:26

2 Answers2

1
\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[
\begin{matrix}
\circ & \bullet & \circ \\
\bullet & \bullet & \bullet \\
\circ & \bullet & \circ 
\end{matrix}
\]
\end{document}

enter image description here

Ignasi
  • 136,588
0

Starting with Ignasi's core, but using tabstackengine instead of matrix allows for the spacing to be tightly controlled and tailored.

\documentclass{article}
\usepackage{tabstackengine}
\TABstackMath
\begin{document}
\[
\setstacktabbedgap{\Sstackgap}
\def\grid{\tabbedShortstack{
\circ & \bullet & \circ \\
\bullet & \bullet & \bullet \\
\circ & \bullet & \circ 
}}
\setstackgap{S}{7pt}\grid\qquad
\setstackgap{S}{4pt}\grid\qquad
\setstackgap{S}{1pt}\grid\qquad
\]
\end{document}

enter image description here