# Simplest way to draw the 3d-points in the set {0,1,2,3,4}^3 [duplicate]

Possible Duplicate:
Tikz realistic 3D grid

I want to draw a finite set of 3d-points. I have been looking at examples on the web, but I have not found anything to do this (the tricky part seems to be that I only want to draw a discrete number of points).

Can anybody suggest what package (and extension) might be a good one to draw the points in the set {0,1,2,3,4}^3 ?

-

## marked as duplicate by Paul Gaborit, Marco Daniel, percusse, Claudio Fiandrino, JakeSep 19 '12 at 7:38

"(the tricky part seems to be that I only want to draw a discrete number of points)." -- So, you do want the grid lines? – kan Sep 15 '12 at 15:23
pgfplots, see the \addplot3 command – cmhughes Sep 15 '12 at 15:25
This question is very similar to this other Tikz realistic 3D grid. Please take a look at it as the answers there might help you. If they do, that's great, and we'll probably close this question as a duplicate just to keep the place tidy and to help people find the answers quickly. If they don't, please edit your question here to explain why so that people can better focus their attention to help you. – Paul Gaborit Sep 15 '12 at 23:21

Maybe I get your question wrong, but do you you search for something like this:

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
\foreach \x in {0,1,2,3,4}
{
\foreach \y in {0,1,2,3,4}
{
\foreach \z in {0,1,2,3,4}
{
\fill[black] (\x, \y, \z) circle (0.1);
}
}
};
\end{tikzpicture}
\end{document}


The result isn't looking quite nice but it draws a dot at any permutation of the coordinates {0,...,4} in 3d space. So there's no further packages or extensions needed, just simple tikZ.

-
circle (0.1) make things big. An alternative is this: \node[color=black] at (\x,\y,\z) {.}; . Is there a better solution? – Herman Jaramillo Nov 2 '15 at 18:09
@HermanJaramillo The circle(0.1) was basically just to demonstrate how it would work. You can basically put every code you like there. – Benedikt Bauer Nov 4 '15 at 16:31
you made a good point. Actually we would like to store all those points in an array and use some tikz function to plot them. Is this possible? – Herman Jaramillo Nov 4 '15 at 17:08
@HermanJaramillo I'm quite sure it is possible somehow. However, consider to post this as a question of its own, since it will require some more explanation on what exactly you are trying to accomplish. – Benedikt Bauer Nov 4 '15 at 18:55