Consider the following:

\documentclass{article}

\begin{document}

\begin{figure}
\centering
\begin{pspicture}(2.4,0.6)
\rput(1.2,0.25){Springboldene}
%   \psset{linestyle=none}
\multido{\r=0.3+0.45}{5}{\pscircle(\r,0.3){0.3}}
\end{pspicture}
\end{figure}

\end{document}


How do I fill the five circles with a gradient color that stretches over all five of them, starting with orange at the left and going to green at the right?

I would like to remove the circles themselves (therefore linestyle=none) but fill the inner of them, as explained.

• Do you want to fill each individual circle with a gradient, or should the gradient stretch over the total width of the five circles? – Jake Mar 21 '13 at 16:26
• The gradient should strech over all five circles. (I'll specify it in my question.) – Svend Tveskæg Mar 21 '13 at 16:28
• If you can construct the outline of the Audi logo then you can use a clip a gradient rectangle with that. – percusse Mar 21 '13 at 16:32
• What does the Audi logo has to do with it? :( I would just like to have a gradient fill of the five circles. – Svend Tveskæg Mar 21 '13 at 16:35
• @SvendMortensen Think of the five circles combined as in Jake's answer. The outline of five circles I mean. Well Audi logo + one more circle. :) – percusse Mar 21 '13 at 16:40

\documentclass{article}
\begin{document}

\begin{pspicture}(-12ex,-3.5ex)(12ex,3.5ex)
\multido{\rA=-8+4}{5}{\pscircle(\rA ex,0){3ex}}}
\rput(0,0){\large\textbf{Springboldene}}
\end{pspicture}

\end{document}


and the same for a gradmidpoint=0.5

• @SvendMortensen: There is also pst-slpe that provides fillstyle=slope (and friends). – Werner Mar 21 '13 at 17:34
• @Werner Nice. I'll probably use this. – Svend Tveskæg Mar 21 '13 at 18:04

Here's how you can do it using TikZ: The filling will stretch over all circles as long as they're specified using a single \path (or \shade) command

\documentclass{article}

\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
\foreach \i in {-2,...,2}{
};
\node [font=\bfseries] (A) {Springboldene};
\end{tikzpicture}

\end{document}

• Nice. I would like to use PSTricks, though. – Svend Tveskæg Mar 21 '13 at 16:38
• @SvendMortensen: Yes, sorry, your question is quite clear about that. It has just become customary that TikZ questions also get a PSTricks answer, and vice versa. I'm sure Herbert or KarlsStudents will come up with a PSTricks approach soon. – Jake Mar 21 '13 at 16:40
• Have you pinged any of them? :) – Svend Tveskæg Mar 21 '13 at 16:43
• @SvendMortensen: There's no global ping, unfortunately, but I think they monitor the {pstricks} tag quite closely. – Jake Mar 21 '13 at 16:44
• Okay. If no PSTricks solution appears, I'll accept your answer (but you can always get an upvote, which you will). – Svend Tveskæg Mar 21 '13 at 16:46

My code seems to be verbose but the extra code is actually to get the precise dimension and placement. It also make you more convenient to adjust the parameters.

\documentclass[pstricks,border=0pt]{standalone}
\usepackage{multido}
\usepackage[nomessages]{fp}

\newpsstyle{A}
{
}

\psset{linestyle=none}

\def\greeting{Springboldene}
\def\hoffset{5pt}
\def\voffset{5pt}

\newsavebox\IBox
\savebox\IBox{\raisebox{\depth}{\greeting}}

\newlength\Left
\newlength\Right
\newlength\Top
\newlength\Bottom

\Left=\dimexpr-0.5\wd\IBox-\hoffset
\Right=\dimexpr0.5\wd\IBox+\hoffset
\Top=\dimexpr0.5\ht\IBox+\voffset
\Bottom=\dimexpr-0.5\ht\IBox-\voffset

% for circles
\FPset\a{-27.00}
\FPset\b{27.00}
\FPset\N{7}
\FPeval\step{round((b-a)/N:2)}
\FPeval\NplusOne{N+1}

\begin{document}
\begin{pspicture}(\Left,\Bottom)(\Right,\Top)
\psclip{\pscustom{\multido{\nx=\a+\step}{\NplusOne}{\pscircle(\nx pt,0){8pt}}}}
\psframe[style=A](\Left,\Bottom)(\Right,\Top)
\endpsclip
\rput(0,0){\usebox\IBox}
\end{pspicture}
\end{document}

• There are too many circles – Jake Mar 21 '13 at 17:42
• @Jake: I will adjust the parameters in the next update. – kiss my armpit Mar 21 '13 at 18:00
• I cannot really follow what you are doing, but it looks fancy. :) Can you explain the code a bit, please? – Svend Tveskæg Mar 22 '13 at 12:09