This is in response to the comment:
but i seems like an awfull lot of code for such a small picture..
TikZ is quite verbose in its syntax. Usually, that's a good thing as it helps make it clear what's going on. However, it can sometimes seem a bit too much in which case it can be useful to know a few techniques for condensing it a little. Here's an example of that for this code. It's not the most concise, as I've tried to ensure that it is still comprehensible. The main thing that I've done is to collapse all the drawing to a single path. The reason that this works is because nodes are drawn after the path that they are on (whereupon the drawing won't occlude the nodes) but their coordinates are available straight away. I've also used labels to do several things at once. By doing that, I can define the coordinate, draw the circle, and place the number.
\documentclass{article}
%\url{http://tex.stackexchange.com/q/81848/86}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\tikzset{
circ/.style={
label={[circlabel=#1]center:{}},
},
circlabel/.style={
circle,
minimum width=2.0mm,
inner sep=0pt,
draw,
fill,
label={above:#1},
},
}
\shadedraw[
line width=0.3mm,
top color=gray!20,
bottom color=white
]
(0.0, 0.0)
coordinate[circ=1] (a)
--
(1.5, 0.0)
coordinate[circ=2] (b)
--
(2.3, 1.0)
coordinate[circ=3] (c)
--
(0.8, 1.0)
coordinate[circ=4] (d)
--
cycle;
\end{tikzpicture}
\end{document}
Defining it all on one path avoids the issue with the non-continuous path since the nodes are not used in defining the actual path. As I've done it above then the coordinates (a), (b), (c), (d) refer to their exact points meaning that in later calls they will work properly: \fill (a) -- (b) -- (c) -- (d) -- cycle; will do what you want it to. If you aren't going to use these coordinates again (so their only purpose was in defining this shape) then you could skip the naming step and condense the code even further.
\documentclass{article}
%\url{http://tex.stackexchange.com/q/81848/86}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\tikzset{
circ/.style={
circle,
minimum width=2.0mm,
inner sep=0pt,
draw,
fill,
label={above:#1},
},
}
\shadedraw[
line width=0.3mm,
top color=gray!20,
bottom color=white
]
(0.0, 0.0)
node[circ=1] {}
--
(1.5, 0.0)
node[circ=2] {}
--
(2.3, 1.0)
node[circ=3] {}
--
(0.8, 1.0)
node[circ=4] {}
--
cycle;
\end{tikzpicture}
\end{document}
Lastly, since the labels follow a sequence, we can automate them.
\documentclass{article}
%\url{http://tex.stackexchange.com/q/81848/86}
\usepackage{tikz}
\newcounter{clabel}
\begin{document}
\begin{tikzpicture}
\tikzset{
c/.style={
insert path={
node[
circle,
minimum width=2.0mm,
inner sep=0pt,
draw,
fill,
label={above:\stepcounter{clabel}\theclabel},
] {}
}
},
reset clabel/.code={%
\setcounter{clabel}{0}%
}
}
\shadedraw[
reset clabel,
line width=0.3mm,
top color=gray!20,
bottom color=white,
]
(0.0, 0.0)
[c]
--
(1.5, 0.0)
[c]
--
(2.3, 1.0)
[c]
--
(0.8, 1.0)
[c]
--
cycle;
\end{tikzpicture}
\end{document}
All of these produce exactly the same picture.
(a.center) -- (b.center) ...etc. then it would fill but that would be over your nodes. – percusse Nov 07 '12 at 22:20