5

Sorry for such an elementary question, but all the examples I could find in search were too complicated.

I'm trying to recreate a circular drop shadow example from the pgf manual. What packages are necessary and where do I place

shadow scale=1.1, shadow xshift=.3ex, shadow yshift=-.3ex,
fill=black, path fading={circle with fuzzy edge 15 percent},
every shadow,

in regards to the rest of the code?

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\usepgflibrary{decorations.shapes}
\begin{document}
\begin{tikzpicture} {1,...,8}
    \node[circle,circular drop shadow,draw=blue,fill=blue!20,thick]
      at (\i*45:1) {Circle \i};
\end{tikzpicture}
\end{document}
  • 2
    The needed library is shadows. The thing you want to place is the default setting. (Though, you can adjust the shadow if you use options like circular drop shadow={<options>}.) Note that you missed \foreach in while copying the example from the manual (which is to prepended to the {1,...,8}). – Qrrbrbirlbel Apr 16 '13 at 22:11
6

For the example you need the shadows library; I added the \foreach line that you missed in your code:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shadows}

\begin{document}

\begin{tikzpicture}
\foreach \i in {1,...,8}
\node[circle,circular drop shadow,draw=blue,fill=blue!20,thick]
at (\i*45:1) {Circle \i};
\end{tikzpicture}

\end{document}

enter image description here

The lines

shadow scale=1.1, shadow xshift=.3ex, shadow yshift=-.3ex,
fill=black, path fading={circle with fuzzy edge 15 percent},
every shadow,

are the default options for this kind of shadow, which you can change using circular drop shadow={<options>}. If you want to modify the path fading, you will also need the fadings library :

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shadows,fadings}

\begin{document}

\begin{tikzpicture}
\foreach \i in {1,...,8}
{
\node[circle,circular drop shadow,draw=blue,fill=blue!20,thick]
at (\i*45:1) {Circle \i};
\node[xshift=5cm,circle,circular drop shadow={fill=orange!50,shadow xshift=0.5ex,shadow yshift=0.5ex,path fading={circle with fuzzy edge 10 percent}},draw=blue,fill=blue!20,thick]
at (\i*45:1) {Circle \i};
}
\end{tikzpicture}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.